Cody

Solution 2012621

Submitted on 10 Nov 2019 by Asif Newaz
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' a = 'abcdefghijklmnopqrstuvwxyz' exp = 'h' b = 8 exp = 'e' b = 8 5 exp = 'l' b = 8 5 12 exp = 'l' b = 8 5 12 12 exp = 'o' b = 8 5 12 12 15 p = 86400

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

s = 'Fantastic' a = 'abcdefghijklmnopqrstuvwxyz' exp = 'F' b = 6 exp = 'a' b = 6 1 exp = 'n' b = 6 1 14 exp = 't' b = 6 1 14 20 exp = 'a' b = 6 1 14 20 1 exp = 's' b = 6 1 14 20 1 19 exp = 't' b = 6 1 14 20 1 19 20 exp = 'i' b = 6 1 14 20 1 19 20 9 exp = 'c' b = 6 1 14 20 1 19 20 9 3 p = 17236800