Cody

Solution 1805833

Submitted on 4 May 2019 by JB
  • Size: 21
  • This is the leading solution.
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
x = 100; y_correct = 73; assert(isequal(cowboy(x),y_correct)) x = 1000; y_correct = 977; assert(isequal(cowboy(x),y_correct)) x = 33; y_correct = 3; assert(isequal(cowboy(x),y_correct)) x = 555; y_correct = 87; assert(isequal(cowboy(x),y_correct)) x = 2; y_correct = 1; assert(isequal(cowboy(x),y_correct))