Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
x = 77;
y_correct =4
assert(isequal(persistence(x),y_correct ))
y_correct =
4
ans =
7 7
ans =
4 9
N =
1
ans =
3 6
N =
2
ans =
1 8
N =
3
ans =
8
N =
4
|
2 | Pass |
%%
x = 976;
y_correct =5
assert(isequal(persistence(x),y_correct ))
y_correct =
5
ans =
9 7 6
ans =
3 7 8
N =
1
ans =
1 6 8
N =
2
ans =
4 8
N =
3
ans =
3 2
N =
4
ans =
6
N =
5
|
3 | Pass |
%%
x =88869;
y_correct =7
assert(isequal(persistence(x),y_correct ))
y_correct =
7
ans =
8 8 8 6 9
ans =
2 7 6 4 8
N =
1
ans =
2 6 8 8
N =
2
ans =
7 6 8
N =
3
ans =
3 3 6
N =
4
ans =
5 4
N =
5
ans =
2 0
N =
6
ans =
0
N =
7
|
Count from 0 to N^M in base N.
220 Solvers
516 Solvers
Who is the smartest MATLAB programmer?
561 Solvers
Who has power to do everything in this world?
318 Solvers
Create an index-powered vector
352 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!