Cody

# Problem 45250. Be happy

Solution 2917531

Submitted on 6 Sep 2020 by Jan Olsen
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))

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

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

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

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

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

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

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

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

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

### Community Treasure Hunt

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

Start Hunting!