Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = 12;y_correct = 3;
assert(isequal(PSR(x),y_correct))
|
2 | Pass |
x = 3102;y_correct = 47;
assert(isequal(PSR(x),y_correct))
|
3 | Pass |
x=10000;y_correct = 100;
assert(isequal(PSR(x),y_correct))
|
4 | Pass |
x=1308276133167003;y_correct = 36105377;
assert(isequal(PSR(x),y_correct))
|
5 | Pass |
x=6469693230;y_correct = 79534;
assert(isequal(PSR(x),y_correct))
|
6 | Pass |
p=cumprod(1:10);
y=arrayfun(@(p) PSR(p),p);
y_correct=[1 1 2 4 10 24 70 192 576 1890];
assert(isequal(y,y_correct))
|
7 | Pass |
x=1000000000000002;
assert(isequal(PSR(PSR(x)),2))
|
405 Solvers
All your base are belong to us
463 Solvers
Reverse the Words (not letters) of a String
297 Solvers
Find the sum of the elements in the "second" diagonal
994 Solvers
Sum of diagonal of a square matrix
1327 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!