Cody

# Problem 54. Maximum running product for a string of numbers

Solution 1753773

Submitted on 18 Mar 2019 by Zain Faruqi
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   Pass
s = '123454321'; i_correct = 3; assert(isequal(running_product(s),i_correct))

k = 123454321 ans = 123454321 l = 9

2   Pass
s = '5820974944592307816406286208998628034825342117067'; i_correct = 28; assert(isequal(running_product(s),i_correct))

k = 5.8210e+48 ans = 5.8210e+48 l = 49

3   Pass
s = '141592653589793238462643383279502884197169399399999'; i_correct = 47; assert(isequal(running_product(s),i_correct))

k = 1.4159e+50 ans = 1.4159e+50 l = 51

4   Pass
s = '7831652712019091456485669234603486104543266482133936072602'; i_correct = 21; assert(isequal(running_product(s),i_correct))

k = 7.8317e+57 ans = 7.8317e+57 l = 58

5   Pass
s = '70066063155881748815209209628292540917153643678925903600113305305488'; i_correct = 44; assert(isequal(running_product(s),i_correct))

k = 7.0066e+67 ans = 7.0066e+67 l = 68

6   Pass
s = '11111'; i_correct = 1; assert(isequal(running_product(s),i_correct))

k = 11111 ans = 11111 l = 5