Cody

# Problem 2690. Armstrong Number

Solution 1986117

Submitted on 22 Oct 2019 by Ngo Minh Ngoc
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))

c = 0 a = '9' b = 9 c = 9 y = 1

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

c = 0 a = '371' b = 27 c = 27 b = 343 c = 370 b = 1 c = 371 y = 1

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

c = 0 a = '407' b = 64 c = 64 b = 0 c = 64 b = 343 c = 407 y = 1

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

c = 0 a = '1634' b = 1 c = 1 b = 1296 c = 1297 b = 81 c = 1378 b = 256 c = 1634 y = 1

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

c = 0 a = '68955' b = 7776 c = 7776 b = 32768 c = 40544 b = 59049 c = 99593 b = 3125 c = 102718 b = 3125 c = 105843 y = 0

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

c = 0 a = '548834' b = 15625 c = 15625 b = 4096 c = 19721 b = 262144 c = 281865 b = 262144 c = 544009 b = 729 c = 544738 b = 4096 c = 548834 y = 1

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

c = 0 a = '1741725' b = 1 c = 1 b = 823543 c = 823544 b = 16384 c = 839928 b = 1 c = 839929 b = 823543 c = 1663472 b = 128 c = 1663600 b = 78125 c = 1741725 y = 1