Cody

Solution 1051028

Submitted on 11 Nov 2016 by shahin rmz
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 = 'hello' c_correct = 86400; assert(isequal(word_product(s),c_correct))

s = hello s = 104 101 108 108 111 s = 8 101 108 108 111 p = 1.0461e+09 s = 8 5 108 108 111 p = 51788160 s = 8 5 12 108 111 p = 5754240 s = 8 5 12 12 111 p = 639360 s = 8 5 12 12 15 p = 86400

2   Pass
s = 'Fantastic' c_correct = 17236800; assert(isequal(word_product(s),c_correct))

s = Fantastic s = 70 97 110 116 97 115 116 105 99 p = 9.9891e+16 s = 6 1 110 116 97 115 116 105 99 p = 1.0298e+15 s = 6 1 14 116 97 115 116 105 99 p = 1.3107e+14 s = 6 1 14 20 97 115 116 105 99 p = 2.2598e+13 s = 6 1 14 20 1 115 116 105 99 p = 2.3296e+11 s = 6 1 14 20 1 19 116 105 99 p = 3.8490e+10 s = 6 1 14 20 1 19 20 105 99 p = 6.6362e+09 s = 6 1 14 20 1 19 20 9 99 p = 568814400 s = 6 1 14 20 1 19 20 9 3 p = 17236800

Suggested Problems

More from this Author95