Cody

# Problem 2690. Armstrong Number

Solution 1523660

Submitted on 9 May 2018 by Nicolas
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 = 9; y_correct = 1; assert(isequal(Armstrong(x),y_correct))

xs = '9' s = 9

2   Pass
x = 371; y_correct = 1; assert(isequal(Armstrong(x),y_correct))

xs = '371' s = 27 s = 370 s = 371

3   Pass
x = 407; y_correct = 1; assert(isequal(Armstrong(x),y_correct))

xs = '407' s = 64 s = 64 s = 407

4   Pass
x = 1634; y_correct = 1; assert(isequal(Armstrong(x),y_correct))

xs = '1634' s = 1 s = 1297 s = 1378 s = 1634

5   Pass
x = 68955; y_correct = 0; assert(isequal(Armstrong(x),y_correct))

xs = '68955' s = 7776 s = 40544 s = 99593 s = 102718 s = 105843

6   Pass
x = 548834; y_correct = 1; assert(isequal(Armstrong(x),y_correct))

xs = '548834' s = 15625 s = 19721 s = 281865 s = 544009 s = 544738 s = 548834

7   Pass
x = 1741725; y_correct = 1; assert(isequal(Armstrong(x),y_correct))

xs = '1741725' s = 1 s = 823544 s = 839928 s = 839929 s = 1663472 s = 1663600 s = 1741725