Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
n=7;p=2;y=biggest_power(n,p)
assert(isequal(y,12));
y =
12
|
2 | Pass |
n=30;p=4;y=biggest_power(n,p)
assert(isequal(y,60480));
y =
60480
|
3 | Pass |
n=25;p=11;y=biggest_power(n,p)
assert(isequal(y,4));
y =
4
|
4 | Pass |
n=1000;p=100;y=biggest_power(n,p)
assert(isequal(y,7257600));
y =
7257600
|
5 | Pass |
s=0;
p=10;
for n=100:-1:20
s(n-19)=biggest_power(n,p);
end
assert(isequal(sum(s),79641800));
assert(isequal(numel(unique(s)),13));
assert(isequal(floor(mean(s)),983232));
|
6 | Pass |
n=100;
s=0;
for p=30:-1:10
s(p-9)=biggest_power(n,p);
end
assert(isequal(sum(s),14825664));
assert(isequal(numel(unique(s)),7));
assert(isequal(floor(mean(s)),705984));
|
1421 Solvers
Given two strings, find the maximum overlap
461 Solvers
Matrix indexing with two vectors of indices
485 Solvers
401 Solvers
224 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!