Cody

# Problem 45249. Frugal number

Solution 2169943

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

ans = logical 0

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

ans = logical 0

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

ans = logical 0

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

ans = logical 0 ans = logical 0

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

ans = logical 0

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

ans = logical 1

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

ans = logical 1

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

ans = logical 1

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

ans = logical 0

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

ans = logical 1

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

ans = logical 1

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

ans = logical 0

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

ans = logical 1

### Community Treasure Hunt

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

Start Hunting!