Cody

Solution 1978898

Submitted on 16 Oct 2019 at 14:31 by Le Cong Hieu
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))

h = '00000001'

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

h = '00000001' h = '00000010' h = '00000011' h = '00000100'

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

h = '00000001' h = '00000010' h = '00000011' h = '00000100' h = '00000101' h = '00000110' h = '00000111' h = '00001000' h = '00001001' h = '00001010' h = '00001011' h = '00001100' h = '00001101' h = '00001110' h = '00001111' h = '00010000' h = '00010001' h = '00010010' h = '00010011' h = '00010100' h = '00010101' h = '00010110' h = '00010111' h = '00011000' h = '00011001' h = '00011010' h = '00011011' h = '00011100' h = '00011101' h = '00011110' h = '00011111' h = '00100000' h = '00100001' h = '00100010' h = '00100011' h = '00100100' h = '00100101' h = '00100110' h = '00100111' h = '00101000' h = '00101001' h = '00101010' h = '00101011' h = '00101100' h = '00101101' h = '00101110' h = '00101111' h = '00110000' h = '00110001' h = '00110010' h = '00110011' h = '00110100' h = '00110101' h = '00110110' h = '00110111' h = '00111000' h = '00111001' h = '00111010' h = '00111011' h = '00111100' h = '00111101' h = '00111110' h = '00111111' h = '01000000' h = '01000001' h = '01000010' h = '01000011' h = '01000100' h = '01000101' h = '01000110' h = '01000111' h = '01001000'