Cody

Solution 77903

Submitted on 17 Apr 2012 by James Kristoff
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
%% assert(isequal(look_and_say([1]),[1 1]))
r = 1 t = 1 2 z = 1 w = 1 x = 1 1 x = 1 1
2   Pass
%% assert(isequal(look_and_say([1 1 1 1 1]),[5 1]))
r = 1 0 0 0 0 t = 1 6 z = 5 w = 1 x = 5 1 x = 5 1
3   Pass
%% assert(isequal(look_and_say([1 3 3 1 5 2 2]),[1 1 2 3 1 1 1 5 2 2]))
r = 1 1 0 1 1 1 0 t = 1 2 4 5 6 8 z = 1 2 1 1 2 w = 1 3 1 5 2 x = 1 1 2 3 1 1 1 5 2 2 x = 1 1 2 3 1 1 1 5 2 2
4   Pass
%% assert(isequal(look_and_say([8 6 7 5 3 0 9]),[1 8 1 6 1 7 1 5 1 3 1 0 1 9]))
r = 1 1 1 1 1 1 1 t = 1 2 3 4 5 6 7 8 z = 1 1 1 1 1 1 1 w = 8 6 7 5 3 0 9 x = 1 8 1 6 1 7 1 5 1 3 1 0 1 9 x = Columns 1 through 10 1 8 1 6 1 7 1 5 1 3 Columns 11 through 14 1 0 1 9