Cody

Solution 566450

Submitted on 27 Jan 2015 by Abdullah Caliskan
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 f = 0 h = 49 f = 1 h = 36 f = 2 h = 18 f = 3 h = 8 f = 4

2   Pass
%% x = 976; y_correct =5 assert(isequal(persistence(x),y_correct ))

y_correct = 5 f = 0 h = 378 f = 1 h = 168 f = 2 h = 48 f = 3 h = 32 f = 4 h = 6 f = 5

3   Pass
%% x =88869; y_correct =7 assert(isequal(persistence(x),y_correct ))

y_correct = 7 f = 0 h = 27648 f = 1 h = 2688 f = 2 h = 768 f = 3 h = 336 f = 4 h = 54 f = 5 h = 20 f = 6 h = 0 f = 7