Cody

Solution 2077349

Submitted on 2 Jan 2020 by 2quack
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))

y = 0 sx = '9' dx = 1 v = 9 y = logical 1

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

y = 0 sx = '371' dx = 3 v = 27 v = 27 343 v = 27 343 1 y = logical 1

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

y = 0 sx = '407' dx = 3 v = 64 v = 64 0 v = 64 0 343 y = logical 1

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

y = 0 sx = '1634' dx = 4 v = 1 v = 1 1296 v = 1 1296 81 v = 1 1296 81 256 y = logical 1

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

y = 0 sx = '68955' dx = 5 v = 7776 v = 7776 32768 v = 7776 32768 59049 v = 7776 32768 59049 3125 v = 7776 32768 59049 3125 3125

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

y = 0 sx = '548834' dx = 6 v = 15625 v = 15625 4096 v = 15625 4096 262144 v = 15625 4096 262144 262144 v = 15625 4096 262144 262144 729 v = 15625 4096 262144 262144 729 4096 y = logical 1

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

y = 0 sx = '1741725' dx = 7 v = 1 v = 1 823543 v = 1 823543 16384 v = 1 823543 16384 1 v = 1 823543 16384 1 823543 v = 1 823543 16384 1 823543 128 v = 1 823543 16384 1 823543 128 78125 y = logical 1

Suggested Problems

More from this Author1