Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = 1;y_correct = 8;
assert(isequal(happy_fun_hyperball(x),y_correct))
|
2 | Pass |
x = 2;y_correct = 24;
assert(isequal(happy_fun_hyperball(x),y_correct))
|
3 | Pass |
tic
j=0;
for flag=1:1000
j=j+happy_fun_hyperball(flag);
end
toc
j
assert(isequal(j,2435870608))
Elapsed time is 1.223448 seconds.
j =
2.435870608000000e+09
|
4 | Pass |
x = 32767;y_correct = 10393302024;
assert(isequal(happy_fun_hyperball(x),y_correct))
|
5 | Pass |
x = 32768;y_correct = 24;
assert(isequal(happy_fun_hyperball(x),y_correct))
|
6 | Pass |
x = 32769;y_correct = 14148064392;
assert(isequal(happy_fun_hyperball(x),y_correct))
|
7 | Pass |
vals=[18744 82424 95784 85704 4392 183768 68712 92456 26232 95928 98952 146328 1368 103064 118872 137144 20904 177144 84984 139992 9672];
k=ceil(21*rand)
assert(isequal(happy_fun_hyperball(99+k),vals(k)))
k =
21
|
1963 Solvers
1312 Solvers
Count from 0 to N^M in base N.
200 Solvers
231 Solvers
How long do each of the stages of the rocket take to burn?
63 Solvers