Cody

# Problem 1299. How long do each of the stages of the rocket take to burn?

Solution 1465040

Submitted on 17 Mar 2018
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Fail
tt=18; rate1=3; rate2=2; y_correct =[12,4,2]; assert(isequal(rocketburntime(tt,rate1,rate2),y_correct))

Index exceeds array bounds. Error in rocketburntime (line 2) a = 1 + r1(1 + r2); Error in Test1 (line 3) assert(isequal(rocketburntime(tt,rate1,rate2),y_correct))

2   Fail
tt=32; rate1=4; rate2=3; y_correct =[24,6,2]; assert(isequal(rocketburntime(tt,rate1,rate2),y_correct))

Index exceeds array bounds. Error in rocketburntime (line 2) a = 1 + r1(1 + r2); Error in Test2 (line 3) assert(isequal(rocketburntime(tt,rate1,rate2),y_correct))

3   Fail
tt=58; rate1=6; rate2=4; y_correct =[48,8,2]; assert(isequal(rocketburntime(tt,rate1,rate2),y_correct))

Index exceeds array bounds. Error in rocketburntime (line 2) a = 1 + r1(1 + r2); Error in Test3 (line 3) assert(isequal(rocketburntime(tt,rate1,rate2),y_correct))