Test | Status | Code Input and Output |
---|---|---|
1 | Fail |
x = 10234;
y_correct = '10000+200+30+4';
assert(strcmp(extended_form(x),y_correct))
y =
'1+200+3000+40000'
|
2 | Fail |
x=987654321;
y_correct='900000000+80000000+7000000+600000+50000+4000+300+20+1';
assert(strcmp(extended_form(x),y_correct))
y =
'9+80+700+6000+50000+400000+3000000+20000000+100000000'
|
3 | Fail |
x = 1000;
y_correct = '1000';
assert(strcmp(extended_form(x),y_correct))
y =
'1'
|
4 | Fail |
x = 314159265358979;
y_correct = '300000000000000+10000000000000+4000000000000+100000000000+50000000000+9000000000+200000000+60000000+5000000+300000+50000+8000+900+70+9';
assert(strcmp(extended_form(x),y_correct))
y =
'3+10+400+1000+50000+900000+2000000+60000000+500000000+3000000000+50000000000+800000000000+9000000000000+70000000000000+900000000000000'
|
5 | Fail |
x=540200;
y_correct='500000+40000+200';
assert(strcmp(extended_form(x),y_correct))
y =
'5+40+2000'
|
Replace NaNs with the number that appears to its left in the row.
2018 Solvers
874 Solvers
Given two strings, find the maximum overlap
461 Solvers
Project Euler: Problem 8, Find largest product in a large string of numbers
315 Solvers
307 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!