Cody

Solution 453247

Submitted on 10 Jun 2014 by goc3
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))

p = 120 p = 480 p = 720 p = 480 p = 120

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

p = 0 p = 0 p = 0 p = 0 p = 9072 p = 4032 p = 2880 p = 6480 p = 1440 p = 1080 p = 0 p = 0 p = 0 p = 0 p = 0 p = 1344 p = 0 p = 0 p = 0 p = 0 p = 0 p = 1152 p = 0 p = 0 p = 0 p = 0 p = 0 p = 31104 p = 7776 p = 6912 p = 0 p = 0 p = 0 p = 0 p = 0 p = 960 p = 960 p = 960 p = 240 p = 120 p = 24 p = 56 p = 0 p = 0 p = 0

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

p = 180 p = 360 p = 540 p = 2700 p = 1620 p = 900 p = 3600 p = 5400 p = 7560 p = 22680 p = 13608 p = 3402 p = 1134 p = 1296 p = 576 p = 1152 p = 1152 p = 2304 p = 1152 p = 864 p = 432 p = 1728 p = 864 p = 432 p = 1008 p = 3024 p = 1890 p = 0 p = 0 p = 0 p = 0 p = 0 p = 512 p = 2304 p = 2016 p = 252 p = 378 p = 3402 p = 1134 p = 1458 p = 13122 p = 6561 p = 6561 p = 19683 p = 19683 p = 19683 p = 59049

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

p = 1008 p = 720 p = 180 p = 420 p = 420 p = 140 p = 0 p = 0 p = 0 p = 0 p = 0 p = 0 p = 0 p = 0 p = 1080 p = 480 p = 3840 p = 4800 p = 5760 p = 5760 p = 12960 p = 3240 p = 1944 p = 1296 p = 1296 p = 0 p = 0 p = 0 p = 0 p = 0 p = 576 p = 0 p = 0 p = 0 p = 0 p = 0 p = 480 p = 720 p = 864 p = 864 p = 2304 p = 2304 p = 384 p = 192 p = 144 p = 162 p = 243 p = 1458 p = 0 p = 0 p = 0 p = 0 p = 0 p = 0

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

p = 0 p = 0 p = 0 p = 0 p = 0 p = 0 p = 450 p = 600 p = 1600 p = 1600 p = 2240 p = 1792 p = 1792 p = 1792 p = 1792 p = 1280 p = 640 p = 0 p = 0 p = 0 p = 0 p = 0 p = 0 p = 0 p = 0 p = 1728 p = 1728 p = 576 p = 1440 p = 720 p = 0 p = 0 p = 0 p = 0 p = 0 p = 315 p = 105 p = 630 p = 360 p = 1080 p = 1296 p = 3024 p = 4032 p = 9072 p = 6048 p = 5040 p = 6480 p = 0 p = 0 p = 0 p = 0 p = 0 p = 0 p = 0 p = 0 p = 0 p = 0 p = 0 p = 0 p = 0 p = 0 p = 0 p = 0 p = 0

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

p = 1