Problem 477. speed vs size

Solution 428105

Submitted on 7 Apr 2014 by J.R.! Menzinger
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
%% str='pause(1)'; ss=14; assert(abs(ss-score(str))<3)

ans = 14.3258

2   Pass
%% str='pause(1/2);pause(1/2)'; ss=22; assert(abs(ss-score(str))<3)

ans = 22.1097

3   Pass
%% str='pause(1/200);pause(1/200)'; ss=12; assert(abs(ss-score(str))<3)

ans = 12.1731

4   Pass
%% str='pause((1/200));pause((1/2))'; ss=19; assert(abs(ss-score(str))<3)

ans = 19.1276

Suggested Problems

More from this Author100

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!