Cody

Problem 45249. Frugal number

Solution 2181454

Submitted on 29 Mar 2020
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   Fail
n = 1; y_correct = 0; assert(isequal(frugal_no(n),y_correct))

Unrecognized function or variable 'x'. Error in frugal_no (line 2) y = x; Error in Test1 (line 3) assert(isequal(frugal_no(n),y_correct))

2   Fail
n = 18; y_correct = 0; assert(isequal(frugal_no(n),y_correct))

Unrecognized function or variable 'x'. Error in frugal_no (line 2) y = x; Error in Test2 (line 3) assert(isequal(frugal_no(n),y_correct))

3   Fail
n = 36; y_correct = 0; assert(isequal(frugal_no(n),y_correct))

Unrecognized function or variable 'x'. Error in frugal_no (line 2) y = x; Error in Test3 (line 3) assert(isequal(frugal_no(n),y_correct))

4   Fail
n = 79; y_correct = 0; assert(isequal(frugal_no(n),y_correct))%% n = 105; y_correct = 0; assert(isequal(frugal_no(n),y_correct))

Unrecognized function or variable 'x'. Error in frugal_no (line 2) y = x; Error in Test4 (line 3) assert(isequal(frugal_no(n),y_correct))%%

5   Fail
n = 106; y_correct = 0; assert(isequal(frugal_no(n),y_correct))

Unrecognized function or variable 'x'. Error in frugal_no (line 2) y = x; Error in Test5 (line 3) assert(isequal(frugal_no(n),y_correct))

6   Fail
n = 125; y_correct = 1; assert(isequal(frugal_no(n),y_correct))

Unrecognized function or variable 'x'. Error in frugal_no (line 2) y = x; Error in Test6 (line 3) assert(isequal(frugal_no(n),y_correct))

7   Fail
n = 128; y_correct = 1; assert(isequal(frugal_no(n),y_correct))

Unrecognized function or variable 'x'. Error in frugal_no (line 2) y = x; Error in Test7 (line 3) assert(isequal(frugal_no(n),y_correct))

8   Fail
n = 243; y_correct = 1; assert(isequal(frugal_no(n),y_correct))

Unrecognized function or variable 'x'. Error in frugal_no (line 2) y = x; Error in Test8 (line 3) assert(isequal(frugal_no(n),y_correct))

9   Fail
n = 344; y_correct = 0; assert(isequal(frugal_no(n),y_correct))

Unrecognized function or variable 'x'. Error in frugal_no (line 2) y = x; Error in Test9 (line 3) assert(isequal(frugal_no(n),y_correct))

10   Fail
n = 11421; y_correct = 1; assert(isequal(frugal_no(n),y_correct))

Unrecognized function or variable 'x'. Error in frugal_no (line 2) y = x; Error in Test10 (line 3) assert(isequal(frugal_no(n),y_correct))

11   Fail
n = 115248; y_correct = 1; assert(isequal(frugal_no(n),y_correct))

Unrecognized function or variable 'x'. Error in frugal_no (line 2) y = x; Error in Test11 (line 3) assert(isequal(frugal_no(n),y_correct))

12   Fail
n = 111050; y_correct = 0; assert(isequal(frugal_no(n),y_correct))

Unrecognized function or variable 'x'. Error in frugal_no (line 2) y = x; Error in Test12 (line 3) assert(isequal(frugal_no(n),y_correct))

13   Fail
n=97969; y_correct = 1; assert(isequal(frugal_no(n),y_correct))

Unrecognized function or variable 'x'. Error in frugal_no (line 2) y = x; Error in Test13 (line 3) assert(isequal(frugal_no(n),y_correct))

Suggested Problems

More from this Author148