Cody

Solution 2169914

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 =11123; b=10; y_correct = 0; assert(isequal(be_happy(n,b),y_correct))

ans = logical 0

2   Pass
n = 347; b=6; y_correct = 1; assert(isequal(be_happy(n,b),y_correct))

ans = logical 1

3   Pass
n = 998; b=10; y_correct = 1; assert(isequal(be_happy(n,b),y_correct))

ans = logical 1

4   Pass
n = 1234; b=4; y_correct = 1; assert(isequal(be_happy(n,b),y_correct))

ans = logical 1

5   Pass
n = 149121303586; b=10; y_correct = 0; assert(isequal(be_happy(n,b),y_correct))

ans = logical 0

6   Pass
n =742356; b=3; y_correct = 0; assert(isequal(be_happy(n,b),y_correct))

ans = logical 0

7   Pass
n = 14916; b=7; y_correct = 0; assert(isequal(be_happy(n,b),y_correct))

ans = logical 0

8   Pass
n = 3148; b=6; y_correct = 0; assert(isequal(be_happy(n,b),y_correct))

ans = logical 0

9   Pass
n = 3148; b=7; y_correct = 0; assert(isequal(be_happy(n,b),y_correct))

ans = logical 0

10   Pass
n = 3148; b=13; y_correct = 1; assert(isequal(be_happy(n,b),y_correct))

ans = logical 1

Suggested Problems

More from this Author145