Cody

Solution 1978928

Submitted on 16 Oct 2019 by Doan Quang Manh
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
n = 1; y_correct = 0; assert(isequal(ret_count(n),y_correct))

a = '01' y = 0

2   Pass
n = 4; y_correct = 1; assert(isequal(ret_count(n),y_correct))

a = '01' a = '10' a = '11' a = '100' y = 1

3   Pass
n = 72; y_correct = 18; assert(isequal(ret_count(n),y_correct))

a = '01' a = '10' a = '11' a = '100' a = '101' a = '110' a = '111' a = '1000' a = '1001' a = '1010' a = '1011' a = '1100' a = '1101' a = '1110' a = '1111' a = '10000' a = '10001' a = '10010' a = '10011' a = '10100' a = '10101' a = '10110' a = '10111' a = '11000' a = '11001' a = '11010' a = '11011' a = '11100' a = '11101' a = '11110' a = '11111' a = '100000' a = '100001' a = '100010' a = '100011' a = '100100' a = '100101' a = '100110' a = '100111' a = '101000' a = '101001' a = '101010' a = '101011' a = '101100' a = '101101' a = '101110' a = '101111' a = '110000' a = '110001' a = '110010' a = '110011' a = '110100' a = '110101' a = '110110' a = '110111' a = '111000' a = '111001' a = '111010' a = '111011' a = '111100' a = '111101' a = '111110' a = '111111' a = '1000000' a = '1000001' a = '1000010' a = '1000011' a = '1000100' a = '1000101' a = '1000110' a = '1000111' a = '1001000' y = 18