Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
assert(isequal(maxexp(5,2),3))
|
2 | Pass |
assert(isequal(maxexp(9,3),4))
|
3 | Fail |
assert(isequal(maxexp(10,14),1))
|
4 | Pass |
q=arrayfun(@(x) maxexp(x,13),2:12);
assert(all(q==0))
|
5 | Pass |
assert(isequal(maxexp(67,2),64))
|
6 | Fail |
assert(isequal(maxexp(10,4),4))
|
7 | Fail |
s1=maxexp(100,3);
s2=maxexp(200,5);
assert(isequal(maxexp(s2,s1)-maxexp(s1,s2),maxexp(100,13)+1))
|
8 | Fail |
v=zeros(1,99);
for a=2:100
v(a-1)=maxexp(100,a);
end
assert(isequal(sum(v==1),10))
assert(isequal(sum(find(v==2)),496))
assert(isequal(sum(v),1299))
assert(isequal(max(v)-min(v),96))
|
Return the 3n+1 sequence for n
6167 Solvers
280 Solvers
2809 Solvers
110 Solvers
Integer Sequence - II : New Fibonacci
252 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!