This solution is outdated. To rescore this solution, sign in.
I managed to pass your testsuite and yet have a solution of non-zero-size.
Funny, eh?
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
% removes overloads addressing this specific testsuite
!/bin/rm assert* fopen* fclose* fread*
% gets expected output/score
fh=fopen('zeroscore.m');str=fread(fh,'*char')'; fclose(fh);
results=cody.verifyCode(str,'assert(isequal(zeroscore(),0))');
% pass/fail
str={'Failed','Passed'};
if results.pass&results.score=='0'&ischar(results.score), fprintf('Congrats! Solution score: %s; Correct output: %s\n',results.score, str{1+results.pass});
else fprintf('Sorry! Solution score: %s; Correct output: %s\n',results.score, str{1+results.pass}); [a,b]=1;
end
/bin/rm: cannot remove ‘assert*’: No such file or directory
/bin/rm: cannot remove ‘fopen*’: No such file or directory
/bin/rm: cannot remove ‘fclose*’: No such file or directory
/bin/rm: cannot remove ‘fread*’: No such file or directory
Congrats! Solution score: 0; Correct output: Passed
|
Replace NaNs with the number that appears to its left in the row.
1710 Solvers
Project Euler: Problem 7, Nth prime
339 Solvers
232 Solvers
299 Solvers
Make a run-length companion vector
453 Solvers