Cody

Solution 563953

Submitted on 23 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 = 1881;y_correct = 30; assert(isequal(yearraey(x),y_correct))

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

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

k = 1 n = 0 m = 11111011110 n = 1 m = 11111011111 n = 2 ans = 1

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

k = 1 n = 0 m = 11111011111 n = 1 ans = 0

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

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

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

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

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

k = 1 n = 0 m = 1110101001100110 n = 1 m = 1110101001100111 n = 2 m = 1110101001101000 n = 3 m = 1110101001101001 n = 4 m = 1110101001101010 n = 5 m = 1110101001101011 n = 6 m = 1110101001101100 n = 7 m = 1110101001101101 n = 8 m = 1110101001101110 n = 9 m = 1110101001101111 n = 10 m = 1110101001110000 n = 11 m = 1110101001110001 n = 12 m = 1110101001110010 n = 13 m = 1110101001110011 n = 14 m = 1110101001110100 n = 15 m = 1110101001110101 n = 16 m = 1110101001110110 n = 17 m = 1110101001110111 n = 18 m = 1110101001111000 n = 19 m = 1110101001111001 n = 20 m = 1110101001111010 n = 21 m = 1110101001111011 n = 22 m = 1110101001111100 n = 23 m = 1110101001111101 n = 24 m = 1110101001111110 n = 25 m = 1110101001111111 n = 26 m = 1110101010000000 n = 27 m = 1110101010000001 n = 28 m = 1110101010000010 n = 29 m = 1110101010000011 n = 30 m = 1110101010000100 n = 31 m = 1110101010000101 n = 32 m = 1110101010000110 n = 33 m = 1110101010000111 n = 34 m = 1110101010001000 n = 35 m = 1110101010001001 n = 36 m = 1110101010001010 n = 37 m = 1110101010001011 n = 38 m = 1110101010001100 n = 39 m = 1110101010001101 n = 40 m = 1110101010001110 n = 41 m = 1110101010001111 n = 42 m = 1110101010010000 n = 43 m = 1110101010010001 n = 44 m = 1110101010010010 n = 45 m = 1110101010010011 n = 46 m = 1110101010010100 n = 47 m = 1110101010010101 n = 48 m = 1110101010010110 n = 49 m = 1110101010010111 n = 50 m = 1110101010011000 n = 51 m = 1110101010011001 n = 52 m = 1110101010011010 n = 53 m = 1110101010011011 n = 54 m = 1110101010011100 n = 55 m = 1110101010011101 n = 56 m = 1110101010011110 n = 57 m = 1110101010011111 n = 58 m = 1110101010100000 n = 59 m = 1110101010100001 n = 60 m = 1110101010100010 n = 61 m = 1110101010100011 n = 62 m = 1110101010100100 n = 63 m = 1110101010100101 n = 64 m = 1110101010100110 n = 65 m = 1110101010100111 n = 66 m = 1110101010101000 n = 67 m = 1110101010101001 n = 68 m = 1110101010101010 n = 69 m = 1110101010101011 n = 70 m = 1110101010101100 n = 71 m = 1110101010101101 n = 72 m = 1110101010101110 n = 73 m = 1110101010101111 n = 74 m = 1110101010110000 n = 75 m = 1110101010110001 n = 76 m = 1110101010110010 n = 77 m = 1110101010110011 n = 78 m = 1110101010110100 n = 79 m = 1110101010110101 n = 80 m = 1110101010110110 n = 81 m = 1110101010110111 n = 82 m = 1110101010111000 n = 83 m = 1110101010111001 n = 84 m = 1110101010111010 n = 85 m = 1110101010111011 n = 86 m = 1110101010111100 n = 87 m = 1110101010111101 n = 88 m = 1110101010111110 n = 89 m = 1110101010111111 n = 90 m = 1110101011000000 n = 91 m = 1110101011000001 n = 92 m = 1110101011000010 n = 93 m = 1110101011000011 n = 94 m = 1110101011000100 n = 95 m = 1110101011000101 n = 96 m = 1110101011000110 n = 97 m = 1110101011000111 n = 98 m = 1110101011001000 n = 99 m = 1110101011001001 n = 100 m = 1110101011001010 n = 101 m = 1110101011001011 n = 102 m = 1110101011001100 n = 103 m = 1110101011001101 n = 104 m = 1110101011001110 n = 105 m = 1110101011001111 n = 106 m = 1110101011010000 n = 107 m = 1110101011010001 n = 108 m = 1110101011010010 n = 109 m = 1110101011010011 n = 110 m = 1110101011010100 n = 111 m = 1110101011010101 n = 112 m = 1110101011010110 n = 113 m = 1110101011010111 n = 114 m = 1110101011011000 n = 115 m = 1110101011011001 n = 116 m = 1110101011011010 n = 117 m = 1110101011011011 n = 118 m = 1110101011011100 n = 119 m = 1110101011011101 n = 120 m = 1110101011011110 n = 121 m = 1110101011011111 n = 122 m = 1110101011100000 n = 123 m = 1110101011100001 n = 124 m = 1110101011100010 n = 125 m = 1110101011100011 n = 126 m = 1110101011100100 n = 127 m = 1110101011100101 n = 128 m = 1110101011100110 n = 129 m = 1110101011100111 n = 130 m = 1110101011101000 n = 131 m = 1110101011101001 n = 132 m = 1110101011101010 n = 133 m = 1110101011101011 n = 134 m = 1110101011101100 n = 135 m = 1110101011101101 n = 136 m = 1110101011101110 n = 137 m = 1110101011101111 n = 138 m = 1110101011110000 n = 139 m = 1110101011110001 n = 140 m = 1110101011110010 n = 141 m = 1110101011110011 n = 142 m = 1110101011110100 n = 143 m = 1110101011110101 n = 144 m = 1110101011110110 n = 145 m = 1110101011110111 n = 146 m = 1110101011111000 n = 147 m = 1110101011111001 n = 148 m = 1110101011111010 n = 149 m = 1110101011111011 n = 150 m = 1110101011111100 n = 151 m = 1110101011111101 n = 152 m = 1110101011111110 n = 153 m = 1110101011111111 n = 154 m = 1110101100000000 n = 155 m = 1110101100000001 n = 156 m = 1110101100000010 n = 157 m = 1110101100000011 n = 158 m = 1110101100000100 n = 159 m = 1110101100000101 n = 160 m = 1110101100000110 n = 161 m = 1110101100000111 n = 162 m = 1110101100001000 n = 163 m = 1110101100001001 n = 164 m = 1110101100001010 n = 165 m = 1110101100001011 n = 166 m = 1110101100001100 n = 167 m = 1110101100001101 n = 168 m = 1110101100001110 n = 169 m = 1110101100001111 n = 170 m = 1110101100010000 n = 171 m = 1110101100010001 n = 172 m = 1110101100010010 n = 173 m = 1110101100010011 n = 174 m = 1110101100010100 n = 175 m = 1110101100010101 n = 176 m = 1110101100010110 n = 177 m = 1110101100010111 n = 178 m = 1110101100011000 n = 179 m = 1110101100011001 n = 180 m = 1110101100011010 n = 181 m = 1110101100011011 n = 182 m = 1110101100011100 n = 183 m = 1110101100011101 n = 184 m = 1110101100011110 n = 185 m = 1110101100011111 n = 186 m = 1110101100100000 n = 187 m = 1110101100100001 n = 188 m = 1110101100100010 n = 189 m = 1110101100100011 n = 190 m = 1110101100100100 n = 191 m = 1110101100100101 n = 192 m = 1110101100100110 n = 193 m = 1110101100100111 n = 194 m = 1110101100101000 n = 195 m = 1110101100101001 n = 196 m = 1110101100101010 n = 197 m = 1110101100101011 n = 198 m = 1110101100101100 n = 199 m = 1110101100101101 n = 200 m = 1110101100101110 n = 201 m = 1110101100101111 n = 202 m = 1110101100110000 n = 203 m = 1110101100110001 n = 204 m = 1110101100110010 n = 205 m = 1110101100110011 n = 206 m = 1110101100110100 n = 207 m = 1110101100110101 n = 208 m = 1110101100110110 n = 209 m = 1110101100110111 n = 210 m = 1110101100111000 n = 211 m = 1110101100111001 n = 212 m = 1110101100111010 n = 213 m = 1110101100111011 n = 214 m = 1110101100111100 n = 215 m = 1110101100111101 n = 216 m = 1110101100111110 n = 217 m = 1110101100111111 n = 218 m = 1110101101000000 n = 219 m = 1110101101000001 n = 220 m = 1110101101000010 n = 221 m = 1110101101000011 n = 222 m = 1110101101000100 n = 223 m = 1110101101000101 n = 224 m = 1110101101000110 n = 225 m = 1110101101000111 n = 226 m = 1110101101001000 n = 227 m = 1110101101001001 n = 228 m = 1110101101001010 n = 229 m = 1110101101001011 n = 230 m = 1110101101001100 n = 231 m = 1110101101001101 n = 232 m = 1110101101001110 n = 233 m = 1110101101001111 n = 234 m = 1110101101010000 n = 235 m = 1110101101010001 n = 236 m = 1110101101010010 n = 237 m = 1110101101010011 n = 238 m = 1110101101010100 n = 239 m = 1110101101010101 n = 240 m = 1110101101010110 n = 241 m = 1110101101010111 n = 242 m = 1110101101011000 n = 243 m = 1110101101011001 n = 244 m = 1110101101011010 n = 245 m = 1110101101011011 n = 246 m = 1110101101011100 n = 247 m = 1110101101011101 n = 248 m = 1110101101011110 n = 249 m = 1110101101011111 n = 250 m = 1110101101100000 n = 251 m = 1110101101100001 n = 252 m = 1110101101100010 n = 253 m = 1110101101100011 n = 254 m = 1110101101100100 n = 255 m = 1110101101100101 n = 256 m = 1110101101100110 n = 257 m = 1110101101100111 n = 258 m = 1110101101101000 n = 259 m = 1110101101101001 n = 260 m = 1110101101101010 n = 261 m = 1110101101101011 n = 262 m = 1110101101101100 n = 263 m = 1110101101101101 n = 264 m = 1110101101101110 n = 265 m = 1110101101101111 n = 266 m = 1110101101110000 n = 267 m = 1110101101110001 n = 268 m = 1110101101110010 n = 269 m = 1110101101110011 n = 270 m = 1110101101110100 n = 271 m = 1110101101110101 n = 272 m = 1110101101110110 n = 273 m = 1110101101110111 n = 274 m = 1110101101111000 n = 275 m = 1110101101111001 n = 276 m = 1110101101111010 n = 277 m = 1110101101111011 n = 278 m = 1110101101111100 n = 279 m = 1110101101111101 n = 280 m = 1110101101111110 n = 281 m = 1110101101111111 n = 282 m = 1110101110000000 n = 283 m = 1110101110000001 n = 284 m = 1110101110000010 n = 285 m = 1110101110000011 n = 286 m = 1110101110000100 n = 287 m = 1110101110000101 n = 288 m = 1110101110000110 n = 289 m = 1110101110000111 n = 290 m = 1110101110001000 n = 291 m = 1110101110001001 n = 292 m = 1110101110001010 n = 293 m = 1110101110001011 n = 294 m = 1110101110001100 n = 295 m = 1110101110001101 n = 296 m = 1110101110001110 n = 297 m = 1110101110001111 n = 298 m = 1110101110010000 n = 299 m = 1110101110010001 n = 300 m = 1110101110010010 n = 301 m = 1110101110010011 n = 302 m = 1110101110010100 n = 303 m = 1110101110010101 n = 304 m = 1110101110010110 n = 305 m = 1110101110010111 n = 306 m = 1110101110011000 n = 307 m = 1110101110011001 n = 308 m = 1110101110011010 n = 309 m = 1110101110011011 n = 310 m = 1110101110011100 n = 311 m = 1110101110011101 n = ...

7   Fail