This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.
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
|
17211 Solvers
Find the two most distant points
1628 Solvers
5112 Solvers
Sum the 'edge' values of a matrix
232 Solvers
191 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!