Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
d = 3;
bt_correct = '|o';
bt = balanced_ternary(d);
assert(isequal(bt,bt_correct))
|
2 | Pass |
%%
d = 52;
bt_correct = '|-o-|';
bt = balanced_ternary(d);
assert(isequal(bt,bt_correct))
|
3 | Pass |
%%
d = 182;
bt_correct = '|-|-|-';
bt = balanced_ternary(d);
assert(isequal(bt,bt_correct))
|
4 | Pass |
%%
d = 26;
bt_correct = '|oo-';
bt = balanced_ternary(d);
assert(isequal(bt,bt_correct))
|
5 | Pass |
%%
d = -5;
bt_correct = '-||';
bt = balanced_ternary(d);
assert(isequal(bt,bt_correct))
|
6 | Pass |
%%
d = -164;
bt_correct = '-|oo-|';
bt = balanced_ternary(d);
assert(isequal(bt,bt_correct))
|
7 | Pass |
%%
d = 512;
bt_correct = '|-o|oo-';
bt = balanced_ternary(d);
assert(isequal(bt,bt_correct))
|
1366 Solvers
386 Solvers
858 Solvers
Cell Counting: How Many Draws?
581 Solvers
Return fibonacci sequence do not use loop and condition
218 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!