Cody

# Problem 2869. There are 10 types of people in the world

Solution 2107930

Submitted on 27 Jan 2020 by Michael Cappello
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 = 1881;y_correct = 30; assert(isequal(yearraey(x),y_correct))

cnt = 0 s = '11101011001' n = 5 cnt = 1 s = '11101011010' n = 5 cnt = 2 s = '11101011011' n = 5 cnt = 3 s = '11101011100' n = 5 cnt = 4 s = '11101011101' n = 5 cnt = 5 s = '11101011110' n = 5 cnt = 6 s = '11101011111' n = 5 cnt = 7 s = '11101100000' n = 5 cnt = 8 s = '11101100001' n = 5 cnt = 9 s = '11101100010' n = 5 cnt = 10 s = '11101100011' n = 5 cnt = 11 s = '11101100100' n = 5 cnt = 12 s = '11101100101' n = 5 cnt = 13 s = '11101100110' n = 5 cnt = 14 s = '11101100111' n = 5 cnt = 15 s = '11101101000' n = 5 cnt = 16 s = '11101101001' n = 5 cnt = 17 s = '11101101010' n = 5 cnt = 18 s = '11101101011' n = 5 cnt = 19 s = '11101101100' n = 5 cnt = 20 s = '11101101101' n = 5 cnt = 21 s = '11101101110' n = 5 cnt = 22 s = '11101101111' n = 5 cnt = 23 s = '11101110000' n = 5 cnt = 24 s = '11101110001' n = 5 cnt = 25 s = '11101110010' n = 5 cnt = 26 s = '11101110011' n = 5 cnt = 27 s = '11101110100' n = 5 cnt = 28 s = '11101110101' n = 5 cnt = 29 s = '11101110110' n = 5 cnt = 30 s = '11101110111' n = 5

2   Pass
x = 2014;y_correct = 1; assert(isequal(yearraey(x),y_correct))

cnt = 0 s = '11111011110' n = 5 cnt = 1 s = '11111011111' n = 5

3   Pass
x = 2015;y_correct = 0; assert(isequal(yearraey(x),y_correct))

cnt = 0 s = '11111011111' n = 5

4   Pass
x = 606;y_correct = 27; assert(isequal(yearraey(x),y_correct))

cnt = 0 s = '1001011110' n = 5 cnt = 1 s = '1001011111' n = 5 cnt = 2 s = '1001100000' n = 5 cnt = 3 s = '1001100001' n = 5 cnt = 4 s = '1001100010' n = 5 cnt = 5 s = '1001100011' n = 5 cnt = 6 s = '1001100100' n = 5 cnt = 7 s = '1001100101' n = 5 cnt = 8 s = '1001100110' n = 5 cnt = 9 s = '1001100111' n = 5 cnt = 10 s = '1001101000' n = 5 cnt = 11 s = '1001101001' n = 5 cnt = 12 s = '1001101010' n = 5 cnt = 13 s = '1001101011' n = 5 cnt = 14 s = '1001101100' n = 5 cnt = 15 s = '1001101101' n = 5 cnt = 16 s = '1001101110' n = 5 cnt = 17 s = '1001101111' n = 5 cnt = 18 s = '1001110000' n = 5 cnt = 19 s = '1001110001' n = 5 cnt = 20 s = '1001110010' n = 5 cnt = 21 s = '1001110011' n = 5 cnt = 22 s = '1001110100' n = 5 cnt = 23 s = '1001110101' n = 5 cnt = 24 s = '1001110110' n = 5 cnt = 25 s = '1001110111' n = 5 cnt = 26 s = '1001111000' n = 5 cnt = 27 s = '1001111001' n = 5

5   Pass
x = 6006;y_correct = 71; assert(isequal(yearraey(x),y_correct))

cnt = 0 s = '1011101110110' n = 6 cnt = 1 s = '1011101110111' n = 6 cnt = 2 s = '1011101111000' n = 6 cnt = 3 s = '1011101111001' n = 6 cnt = 4 s = '1011101111010' n = 6 cnt = 5 s = '1011101111011' n = 6 cnt = 6 s = '1011101111100' n = 6 cnt = 7 s = '1011101111101' n = 6 cnt = 8 s = '1011101111110' n = 6 cnt = 9 s = '1011101111111' n = 6 cnt = 10 s = '1011110000000' n = 6 cnt = 11 s = '1011110000001' n = 6 cnt = 12 s = '1011110000010' n = 6 cnt = 13 s = '1011110000011' n = 6 cnt = 14 s = '1011110000100' n = 6 cnt = 15 s = '1011110000101' n = 6 cnt = 16 s = '1011110000110' n = 6 cnt = 17 s = '1011110000111' n = 6 cnt = 18 s = '1011110001000' n = 6 cnt = 19 s = '1011110001001' n = 6 cnt = 20 s = '1011110001010' n = 6 cnt = 21 s = '1011110001011' n = 6 cnt = 22 s = '1011110001100' n = 6 cnt = 23 s = '1011110001101' n = 6 cnt = 24 s = '1011110001110' n = 6 cnt = 25 s = '1011110001111' n = 6 cnt = 26 s = '1011110010000' n = 6 cnt = 27 s = '1011110010001' n = 6 cnt = 28 s = '1011110010010' n = 6 cnt = 29 s = '1011110010011' n = 6 cnt = 30 s = '1011110010100' n = 6 cnt = 31 s = '1011110010101' n = 6 cnt = 32 s = '1011110010110' n = 6 cnt = 33 s = '1011110010111' n = 6 cnt = 34 s = '1011110011000' n = 6 cnt = 35 s = '1011110011001' n = 6 cnt = 36 s = '1011110011010' n = 6 cnt = 37 s = '1011110011011' n = 6 cnt = 38 s = '1011110011100' n = 6 cnt = 39 s = '1011110011101' n = 6 cnt = 40 s = '1011110011110' n = 6 cnt = 41 s = '1011110011111' n = 6 cnt = 42 s = '1011110100000' n = 6 cnt = 43 s = '1011110100001' n = 6 cnt = 44 s = '1011110100010' n = 6 cnt = 45 s = '1011110100011' n = 6 cnt = 46 s = '1011110100100' n = 6 cnt = 47 s = '1011110100101' n = 6 cnt = 48 s = '1011110100110' n = 6 cnt = 49 s = '1011110100111' n = 6 cnt = 50 s = '1011110101000' n = 6 cnt = 51 s = '1011110101001' n = 6 cnt = 52 s = '1011110101010' n = 6 cnt = 53 s = '1011110101011' n = 6 cnt = 54 s = '1011110101100' n = 6 cnt = 55 s = '1011110101101' n = 6 cnt = 56 s = '1011110101110' n = 6 cnt = 57 s = '1011110101111' n = 6 cnt = 58 s = '1011110110000' n = 6 cnt = 59 s = '1011110110001' n = 6 cnt = 60 s = '1011110110010' n = 6 cnt = 61 s = '1011110110011' n = 6 cnt = 62 s = '1011110110100' n = 6 cnt = 63 s = '1011110110101' n = 6 cnt = 64 s = '1011110110110' n = 6 cnt = 65 s = '1011110110111' n = 6 cnt = 66 s = '1011110111000' n = 6 cnt = 67 s = '1011110111001' n = 6 cnt = 68 s = '1011110111010' n = 6 cnt = 69 s = '1011110111011' n = 6 cnt = 70 s = '1011110111100' n = 6 cnt = 71 s = '1011110111101' n = 6

6   Pass
x = 60006;y_correct = 369; assert(isequal(yearraey(x),y_correct))

cnt = 0 s = '1110101001100110' n = 8 cnt = 1 s = '1110101001100111' n = 8 cnt = 2 s = '1110101001101000' n = 8 cnt = 3 s = '1110101001101001' n = 8 cnt = 4 s = '1110101001101010' n = 8 cnt = 5 s = '1110101001101011' n = 8 cnt = 6 s = '1110101001101100' n = 8 cnt = 7 s = '1110101001101101' n = 8 cnt = 8 s = '1110101001101110' n = 8 cnt = 9 s = '1110101001101111' n = 8 cnt = 10 s = '1110101001110000' n = 8 cnt = 11 s = '1110101001110001' n = 8 cnt = 12 s = '1110101001110010' n = 8 cnt = 13 s = '1110101001110011' n = 8 cnt = 14 s = '1110101001110100' n = 8 cnt = 15 s = '1110101001110101' n = 8 cnt = 16 s = '1110101001110110' n = 8 cnt = 17 s = '1110101001110111' n = 8 cnt = 18 s = '1110101001111000' n = 8 cnt = 19 s = '1110101001111001' n = 8 cnt = 20 s = '1110101001111010' n = 8 cnt = 21 s = '1110101001111011' n = 8 cnt = 22 s = '1110101001111100' n = 8 cnt = 23 s = '1110101001111101' n = 8 cnt = 24 s = '1110101001111110' n = 8 cnt = 25 s = '1110101001111111' n = 8 cnt = 26 s = '1110101010000000' n = 8 cnt = 27 s = '1110101010000001' n = 8 cnt = 28 s = '1110101010000010' n = 8 cnt = 29 s = '1110101010000011' n = 8 cnt = 30 s = '1110101010000100' n = 8 cnt = 31 s = '1110101010000101' n = 8 cnt = 32 s = '1110101010000110' n = 8 cnt = 33 s = '1110101010000111' n = 8 cnt = 34 s = '1110101010001000' n = 8 cnt = 35 s = '1110101010001001' n = 8 cnt = 36 s = '1110101010001010' n = 8 cnt = 37 s = '1110101010001011' n = 8 cnt = 38 s = '1110101010001100' n = 8 cnt = 39 s = '1110101010001101' n = 8 cnt = 40 s = '1110101010001110' n = 8 cnt = 41 s = '1110101010001111' n = 8 cnt = 42 s = '1110101010010000' n = 8 cnt = 43 s = '1110101010010001' n = 8 cnt = 44 s = '1110101010010010' n = 8 cnt = 45 s = '1110101010010011' n = 8 cnt = 46 s = '1110101010010100' n = 8 cnt = 47 s = '1110101010010101' n = 8 cnt = 48 s = '1110101010010110' n = 8 cnt = 49 s = '1110101010010111' n = 8 cnt = 50 s = '1110101010011000' n = 8 cnt = 51 s = '1110101010011001' n = 8 cnt = 52 s = '1110101010011010' n = 8 cnt = 53 s = '1110101010011011' n = 8 cnt = 54 s = '1110101010011100' n = 8 cnt = 55 s = '1110101010011101' n = 8 cnt = 56 s = '1110101010011110' n = 8 cnt = 57 s = '1110101010011111' n = 8 cnt = 58 s = '1110101010100000' n = 8 cnt = 59 s = '1110101010100001' n = 8 cnt = 60 s = '1110101010100010' n = 8 cnt = 61 s = '1110101010100011' n = 8 cnt = 62 s = '1110101010100100' n = 8 cnt = 63 s = '1110101010100101' n = 8 cnt = 64 s = '1110101010100110' n = 8 cnt = 65 s = '1110101010100111' n = 8 cnt = 66 s = '1110101010101000' n = 8 cnt = 67 s = '1110101010101001' n = 8 cnt = 68 s = '1110101010101010' n = 8 cnt = 69 s = '1110101010101011' n = 8 cnt = 70 s = '1110101010101100' n = 8 cnt = 71 s = '1110101010101101' n = 8 cnt = 72 s = '1110101010101110' n = 8 cnt = 73 s = '1110101010101111' n = 8 cnt = 74 s = '1110101010110000' n = 8 cnt = 75 s = '1110101010110001' n = 8 cnt = 76 s = '1110101010110010' n = 8 cnt = 77 s = '1110101010110011' n = 8 cnt = 78 s = '1110101010110100' n = 8 cnt = 79 s = '1110101010110101' n = 8 cnt = 80 s = '1110101010110110' n = 8 cnt = 81 s = '1110101010110111' n = 8 cnt = 82 s = '1110101010111000' n = 8 cnt = 83 s = '1110101010111001' n = 8 cnt = 84 s = '1110101010111010' n = 8 cnt = 85 s = '1110101010111011' n = 8 cnt = 86 s = '1110101010111100' n = 8 cnt = 87 s = '1110101010111101' n = 8 cnt = 88 s = '1110101010111110' n = 8 cnt = 89 s = '1110101010111111' n = 8 cnt = 90 s = '1110101011000000' n = 8 cnt = 91 s = '1110101011000001' n = 8 cnt = 92 s = '1110101011000010' n = 8 cnt = 93 s = '1110101011000011' n = 8 cnt = 94 s = '1110101011000100' n = 8 cnt = 95 s = '1110101011000101' n = 8 cnt = 96 s = '1110101011000110' n = 8 cnt = 97 s = '1110101011000111' n = 8 cnt = 98 s = '1110101011001000' n = 8 cnt = 99 s = '1110101011001001' n = 8 cnt = 100 s = '1110101011001010' n = 8 cnt = 101 s = '1110101011001011' n = 8 cnt = 102 s = '1110101011001100' n = 8 cnt = 103 s = '1110101011001101' n = 8 cnt = 104 s = '1110101011001110' n = 8 cnt = 105 s = '1110101011001111' n = 8 cnt = 106 s = '1110101011010000' n = 8 cnt = 107 s = '1110101011010001' n = 8 cnt = 108 s = '1110101011010010' n = 8 cnt = 109 s = '1110101011010011' n = 8 cnt = 110 s = '1110101011010100' n = 8 cnt = 111 s = '1110101011010101' n = 8 cnt = 112 s = '1110101011010110' n = 8 cnt = 113 s = '1110101011010111' n = 8 cnt = 114 s = '1110101011011000' n = 8 cnt = 115 s = '1110101011011001' n = 8 cnt = 116 s = '1110101011011010' n = 8 cnt = 117 s = '1110101011011011' n = 8 cnt = 118 s = '1110101011011100' n = 8 cnt = 119 s = '1110101011011101' n = 8 cnt = 120 s = '1110101011011110' n = 8 cnt = 121 s = '1110101011011111' n = 8 cnt = 122 s = '1110101011100000' n = 8 cnt = 123 s = '1110101011100001' n = 8 cnt = 124 s = '1110101011100010' n = 8 cnt = 125 s = '1110101011100011' n = 8 cnt = 126 s = '1110101011100100' n = 8 cnt = 127 s = '1110101011100101' n = 8 cnt = 128 s = '1110101011100110' n = 8 cnt = 129 s = '1110101011100111' n = 8 cnt = 130 s = '1110101011101000' n = 8 cnt = 131 s = '1110101011101001' n = 8 cnt = 132 s = '1110101011101010' n = 8 cnt = 133 s = '1110101011101011' n = 8 cnt = 134 s = '1110101011101100' n = 8 cnt = 135 s = '1110101011101101' n = 8 cnt = 136 s = '1110101011101110' n = 8 cnt = 137 s = '1110101011101111' n = 8 cnt = 138 s = '1110101011110000' n = 8 cnt = 139 s = '1110101011110001' n = 8 cnt = 140 s = '1110101011110010' n = 8 cnt = 141 s = '1110101011110011' n = 8 cnt = 142 s = '1110101011110100' n = 8 cnt = 143 s = '1110101011110101' n = 8 cnt = 144 s = '1110101011110110' n = 8 cnt = 145 s = '1110101011110111' n = 8 cnt = 146 s = '1110101011111000' n = 8 cnt = 147 s = '1110101011111001' n = 8 cnt = 148 s = '1110101011111010' n = 8 cnt = 149 s = '1110101011111011' n = 8 cnt = 150 s = '1110101011111100' n = 8 cnt = 151 s = '1110101011111101' n = 8 cnt = 152 s = '1110101011111110' n = 8 cnt = 153 s = '1110101011111111' n = 8 cnt = 154 s = '1110101100000000' n = 8 cnt = 155 s = '1110101100000001' n = 8 cnt = 156 s = '1110101100000010' n = 8 cnt = 157 s = '1110101100000011' n = 8 cnt = 158 s = '1110101100000100' n = 8 cnt = 159 s = '1110101100000101' n = 8 cnt = 160 s = '1110101100000110' n = 8 cnt = 161 s = '1110101100000111' n = 8 cnt = 162 s = '1110101100001000' n = 8 cnt = 163 s = '1110101100001001' n = 8 cnt = 164 s = '1110101100001010' n = 8 cnt = 165 s = '1110101100001011' n = 8 cnt = 166 s = '11101011000011...

7   Pass
k=zeros(1,15); for n=1:15 y=2^n+2; k(n)=yearraey(y); end y_correct=[1 1 5 3 11 7 23 15 47 31 95 63 191 127 383]; assert(isequal(k,y_correct))

cnt = 0 s = '100' n = 1 cnt = 1 s = '101' n = 1 cnt = 0 s = '110' n = 1 cnt = 1 s = '111' n = 1 cnt = 0 s = '1010' n = 2 cnt = 1 s = '1011' n = 2 cnt = 2 s = '1100' n = 2 cnt = 3 s = '1101' n = 2 cnt = 4 s = '1110' n = 2 cnt = 5 s = '1111' n = 2 cnt = 0 s = '10010' n = 2 cnt = 1 s = '10011' n = 2 cnt = 2 s = '10100' n = 2 cnt = 3 s = '10101' n = 2 cnt = 0 s = '100010' n = 3 cnt = 1 s = '100011' n = 3 cnt = 2 s = '100100' n = 3 cnt = 3 s = '100101' n = 3 cnt = 4 s = '100110' n = 3 cnt = 5 s = '100111' n = 3 cnt = 6 s = '101000' n = 3 cnt = 7 s = '101001' n = 3 cnt = 8 s = '101010' n = 3 cnt = 9 s = '101011' n = 3 cnt = 10 s = '101100' n = 3 cnt = 11 s = '101101' n = 3 cnt = 0 s = '1000010' n = 3 cnt = 1 s = '1000011' n = 3 cnt = 2 s = '1000100' n = 3 cnt = 3 s = '1000101' n = 3 cnt = 4 s = '1000110' n = 3 cnt = 5 s = '1000111' n = 3 cnt = 6 s = '1001000' n = 3 cnt = 7 s = '1001001' n = 3 cnt = 0 s = '10000010' n = 4 cnt = 1 s = '10000011' n = 4 cnt = 2 s = '10000100' n = 4 cnt = 3 s = '10000101' n = 4 cnt = 4 s = '10000110' n = 4 cnt = 5 s = '10000111' n = 4 cnt = 6 s = '10001000' n = 4 cnt = 7 s = '10001001' n = 4 cnt = 8 s = '10001010' n = 4 cnt = 9 s = '10001011' n = 4 cnt = 10 s = '10001100' n = 4 cnt = 11 s = '10001101' n = 4 cnt = 12 s = '10001110' n = 4 cnt = 13 s = '10001111' n = 4 cnt = 14 s = '10010000' n = 4 cnt = 15 s = '10010001' n = 4 cnt = 16 s = '10010010' n = 4 cnt = 17 s = '10010011' n = 4 cnt = 18 s = '10010100' n = 4 cnt = 19 s = '10010101' n = 4 cnt = 20 s = '10010110' n = 4 cnt = 21 s = '10010111' n = 4 cnt = 22 s = '10011000' n = 4 cnt = 23 s = '10011001' n = 4 cnt = 0 s = '100000010' n = 4 cnt = 1 s = '100000011' n = 4 cnt = 2 s = '100000100' n = 4 cnt = 3 s = '100000101' n = 4 cnt = 4 s = '100000110' n = 4 cnt = 5 s = '100000111' n = 4 cnt = 6 s = '100001000' n = 4 cnt = 7 s = '100001001' n = 4 cnt = 8 s = '100001010' n = 4 cnt = 9 s = '100001011' n = 4 cnt = 10 s = '100001100' n = 4 cnt = 11 s = '100001101' n = 4 cnt = 12 s = '100001110' n = 4 cnt = 13 s = '100001111' n = 4 cnt = 14 s = '100010000' n = 4 cnt = 15 s = '100010001' n = 4 cnt = 0 s = '1000000010' n = 5 cnt = 1 s = '1000000011' n = 5 cnt = 2 s = '1000000100' n = 5 cnt = 3 s = '1000000101' n = 5 cnt = 4 s = '1000000110' n = 5 cnt = 5 s = '1000000111' n = 5 cnt = 6 s = '1000001000' n = 5 cnt = 7 s = '1000001001' n = 5 cnt = 8 s = '1000001010' n = 5 cnt = 9 s = '1000001011' n = 5 cnt = 10 s = '1000001100' n = 5 cnt = 11 s = '1000001101' n = 5 cnt = 12 s = '1000001110' n = 5 cnt = 13 s = '1000001111' n = 5 cnt = 14 s = '1000010000' n = 5 cnt = 15 s = '1000010001' n = 5 cnt = 16 s = '1000010010' n = 5 cnt = 17 s = '1000010011' n = 5 cnt = 18 s = '1000010100' n = 5 cnt = 19 s = '1000010101' n = 5 cnt = 20 s = '1000010110' n = 5 cnt = 21 s = '1000010111' n = 5 cnt = 22 s = '1000011000' n = 5 cnt = 23 s = '1000011001' n = 5 cnt = 24 s = '1000011010' n = 5 cnt = 25 s = '1000011011' n = 5 cnt = 26 s = '1000011100' n = 5 cnt = 27 s = '1000011101' n = 5 cnt = 28 s = '1000011110' n = 5 cnt = 29 s = '1000011111' n = 5 cnt = 30 s = '1000100000' n = 5 cnt = 31 s = '1000100001' n = 5 cnt = 32 s = '1000100010' n = 5 cnt = 33 s = '1000100011' n = 5 cnt = 34 s = '1000100100' n = 5 cnt = 35 s = '1000100101' n = 5 cnt = 36 s = '1000100110' n = 5 cnt = 37 s = '1000100111' n = 5 cnt = 38 s = '1000101000' n = 5 cnt = 39 s = '1000101001' n = 5 cnt = 40 s = '1000101010' n = 5 cnt = 41 s = '1000101011' n = 5 cnt = 42 s = '1000101100' n = 5 cnt = 43 s = '1000101101' n = 5 cnt = 44 s = '1000101110' n = 5 cnt = 45 s = '1000101111' n = 5 cnt = 46 s = '1000110000' n = 5 cnt = 47 s = '1000110001' n = 5 cnt = 0 s = '10000000010' n = 5 cnt = 1 s = '10000000011' n = 5 cnt = 2 s = '10000000100' n = 5 cnt = 3 s = '10000000101' n = 5 cnt = 4 s = '10000000110' n = 5 cnt = 5 s = '10000000111' n = 5 cnt = 6 s = '10000001000' n = 5 cnt = 7 s = '10000001001' n = 5 cnt = 8 s = '10000001010' n = 5 cnt = 9 s = '10000001011' n = 5 cnt = 10 s = '10000001100' n = 5 cnt = 11 s = '10000001101' n = 5 cnt = 12 s = '10000001110' n = 5 cnt = 13 s = '10000001111' n = 5 cnt = 14 s = '10000010000' n = 5 cnt = 15 s = '10000010001' n = 5 cnt = 16 s = '10000010010' n = 5 cnt = 17 s = '10000010011' n = 5 cnt = 18 s = '10000010100' n = 5 cnt = 19 s = '10000010101' n = 5 cnt = 20 s = '10000010110' n = 5 cnt = 21 s = '10000010111' n = 5 cnt = 22 s = '10000011000' n = 5 cnt = 23 s = '10000011001' n = 5 cnt = 24 s = '10000011010' n = 5 cnt = 25 s = '10000011011' n = 5 cnt = 26 s = '10000011100' n = 5 cnt = 27 s = '10000011101' n = 5 cnt = 28 s = '10000011110' n = 5 cnt = 29 s = '10000011111' n = 5 cnt = 30 s = '10000100000' n = 5 cnt = 31 s = '10000100001' n = 5 cnt = 0 s = '100000000010' n = 6 cnt = 1 s = '100000000011' n = 6 cnt = 2 s = '100000000100' n = 6 cnt = 3 s = '100000000101' n = 6 cnt = 4 s = '100000000110' n = 6 cnt = 5 s = '100000000111' n = 6 cnt = 6 s = '100000001000' n = 6 cnt = 7 s = '100000001001' n = 6 cnt = 8 s = '100000001010' n = 6 cnt = 9 s = '100000001011' n = 6 cnt = 10 s = '100000001100' n = 6 cnt = 11 s = '100000001101' n = 6 cnt = 12 s = '100000001110' n = 6 cnt = 13 s = '100000001111' n = 6 cnt = 14 s = '100000010000' n = 6 cnt = 15 s = '100000010001' n = 6 cnt = 16 s = '100000010010' n = 6 cnt = 17 s = '100000010011' n = 6 cnt = 18 s = '100000010100' n = 6 cnt = 19 s = '100000010101' n = 6 cnt = 20 s = '100000010110' n = 6 cnt = 21 s = '100000010111' n = 6 cnt = 22 s = '100000011000' n = 6 cnt = 23 s = '100000011001' n = 6 cnt = 24 s = '100000011010' n = 6 cnt = 25 s = '100000011011' n = 6 cnt = 26 s = '100000011100' n = 6 cnt = 27 s = '100000011101' n = 6 cnt = 28 s = '100000011110' n = 6 cnt = 29 s = '100000011111' n = 6 cnt = 30 s = '100000100000' n = 6 cnt = 31 s = '100000100001' n = 6 cnt = 32 s = '100000100010' n = 6 cnt = 33 s = ...