Cody

Solution 355832

Submitted on 19 Nov 2013 by James
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
%% x = 77; y_correct =4 assert(isequal(persistence(x),y_correct ))
y_correct = 4 ans = 7 7 ans = 4 9 ans = 3 6 ans = 1 8 ans = 8
2   Pass
%% x = 976; y_correct =5 assert(isequal(persistence(x),y_correct ))
y_correct = 5 ans = 9 7 6 ans = 3 7 8 ans = 1 6 8 ans = 4 8 ans = 3 2 ans = 6
3   Pass
%% x =88869; y_correct =7 assert(isequal(persistence(x),y_correct ))
y_correct = 7 ans = 8 8 8 6 9 ans = 2 7 6 4 8 ans = 2 6 8 8 ans = 7 6 8 ans = 3 3 6 ans = 5 4 ans = 2 0 ans = 0