Cody

Solution 244414

Submitted on 14 May 2013 by Shaun VanWeelden
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Pass
%% x = 128205; n = 4 y_correct = true; assert(isequal(parasitic(x,n),y_correct))

n = 4 d = 39 s = 0.025641 ans = 0 s = 0.051282 ans = 0 s = 0.076923 ans = 0 s = 0.102564 ans = 0 s = 0.128205 ans = 1

2   Pass
%% x = 179487; n = 4; y_correct = true; assert(isequal(parasitic(x,n),y_correct))

d = 39 s = 0.025641 ans = 0 s = 0.051282 ans = 0 s = 0.076923 ans = 0 s = 0.102564 ans = 0 s = 0.128205 ans = 0 s = 0.153846 ans = 0 s = 0.179487 ans = 1

3   Pass
%% x = 179487; n = 3; y_correct = false; assert(isequal(parasitic(x,n),y_correct))

d = 29 s = 0.034483 ans = 0 s = 0.068966 ans = 0 s = 0.103448 ans = 0 s = 0.137931 ans = 0 s = 0.172414 ans = 0 s = 0.206897 ans = 0 s = 0.241379 ans = 0 s = 0.275862 ans = 0 s = 0.310345 ans = 0 s = 0.344828 ans = 0 s = 0.379310 ans = 0 s = 0.413793 ans = 0 s = 0.448276 ans = 0 s = 0.482759 ans = 0 s = 0.517241 ans = 0 s = 0.551724 ans = 0 s = 0.586207 ans = 0 s = 0.620690 ans = 0 s = 0.655172 ans = 0 s = 0.689655 ans = 0 s = 0.724138 ans = 0 s = 0.758621 ans = 0 s = 0.793103 ans = 0 s = 0.827586 ans = 0 s = 0.862069 ans = 0 s = 0.896552 ans = 0 s = 0.931034 ans = 0 s = 0.965517 ans = 0 s = 1.000000 ans = 0

More from this Author23