Cody

Solution 1937718

Submitted on 16 Sep 2019 by Augusto Mazzei
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 k = 2 k = 3 k = 4 k = 5 k = 6 k = 7 k = 8 k = 9 k = 10 k = 11 k = 12 k = 13 k = 14 k = 15 k = 16 k = 17 k = 18 k = 19 k = 20 k = 21 k = 22 k = 23 k = 24 k = 25 k = 26 k = 27 k = 28 k = 29 k = 30

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

k = 1

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

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

k = 1 k = 2 k = 3 k = 4 k = 5 k = 6 k = 7 k = 8 k = 9 k = 10 k = 11 k = 12 k = 13 k = 14 k = 15 k = 16 k = 17 k = 18 k = 19 k = 20 k = 21 k = 22 k = 23 k = 24 k = 25 k = 26 k = 27

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

k = 1 k = 2 k = 3 k = 4 k = 5 k = 6 k = 7 k = 8 k = 9 k = 10 k = 11 k = 12 k = 13 k = 14 k = 15 k = 16 k = 17 k = 18 k = 19 k = 20 k = 21 k = 22 k = 23 k = 24 k = 25 k = 26 k = 27 k = 28 k = 29 k = 30 k = 31 k = 32 k = 33 k = 34 k = 35 k = 36 k = 37 k = 38 k = 39 k = 40 k = 41 k = 42 k = 43 k = 44 k = 45 k = 46 k = 47 k = 48 k = 49 k = 50 k = 51 k = 52 k = 53 k = 54 k = 55 k = 56 k = 57 k = 58 k = 59 k = 60 k = 61 k = 62 k = 63 k = 64 k = 65 k = 66 k = 67 k = 68 k = 69 k = 70 k = 71

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

k = 1 k = 2 k = 3 k = 4 k = 5 k = 6 k = 7 k = 8 k = 9 k = 10 k = 11 k = 12 k = 13 k = 14 k = 15 k = 16 k = 17 k = 18 k = 19 k = 20 k = 21 k = 22 k = 23 k = 24 k = 25 k = 26 k = 27 k = 28 k = 29 k = 30 k = 31 k = 32 k = 33 k = 34 k = 35 k = 36 k = 37 k = 38 k = 39 k = 40 k = 41 k = 42 k = 43 k = 44 k = 45 k = 46 k = 47 k = 48 k = 49 k = 50 k = 51 k = 52 k = 53 k = 54 k = 55 k = 56 k = 57 k = 58 k = 59 k = 60 k = 61 k = 62 k = 63 k = 64 k = 65 k = 66 k = 67 k = 68 k = 69 k = 70 k = 71 k = 72 k = 73 k = 74 k = 75 k = 76 k = 77 k = 78 k = 79 k = 80 k = 81 k = 82 k = 83 k = 84 k = 85 k = 86 k = 87 k = 88 k = 89 k = 90 k = 91 k = 92 k = 93 k = 94 k = 95 k = 96 k = 97 k = 98 k = 99 k = 100 k = 101 k = 102 k = 103 k = 104 k = 105 k = 106 k = 107 k = 108 k = 109 k = 110 k = 111 k = 112 k = 113 k = 114 k = 115 k = 116 k = 117 k = 118 k = 119 k = 120 k = 121 k = 122 k = 123 k = 124 k = 125 k = 126 k = 127 k = 128 k = 129 k = 130 k = 131 k = 132 k = 133 k = 134 k = 135 k = 136 k = 137 k = 138 k = 139 k = 140 k = 141 k = 142 k = 143 k = 144 k = 145 k = 146 k = 147 k = 148 k = 149 k = 150 k = 151 k = 152 k = 153 k = 154 k = 155 k = 156 k = 157 k = 158 k = 159 k = 160 k = 161 k = 162 k = 163 k = 164 k = 165 k = 166 k = 167 k = 168 k = 169 k = 170 k = 171 k = 172 k = 173 k = 174 k = 175 k = 176 k = 177 k = 178 k = 179 k = 180 k = 181 k = 182 k = 183 k = 184 k = 185 k = 186 k = 187 k = 188 k = 189 k = 190 k = 191 k = 192 k = 193 k = 194 k = 195 k = 196 k = 197 k = 198 k = 199 k = 200 k = 201 k = 202 k = 203 k = 204 k = 205 k = 206 k = 207 k = 208 k = 209 k = 210 k = 211 k = 212 k = 213 k = 214 k = 215 k = 216 k = 217 k = 218 k = 219 k = 220 k = 221 k = 222 k = 223 k = 224 k = 225 k = 226 k = 227 k = 228 k = 229 k = 230 k = 231 k = 232 k = 233 k = 234 k = 235 k = 236 k = 237 k = 238 k = 239 k = 240 k = 241 k = 242 k = 243 k = 244 k = 245 k = 246 k = 247 k = 248 k = 249 k = 250 k = 251 k = 252 k = 253 k = 254 k = 255 k = 256 k = 257 k = 258 k = 259 k = 260 k = 261 k = 262 k = 263 k = 264 k = 265 k = 266 k = 267 k = 268 k = 269 k = 270 k = 271 k = 272 k = 273 k = 274 k = 275 k = 276 k = 277 k = 278 k = 279 k = 280 k = 281 k = 282 k = 283 k = 284 k = 285 k = 286 k = 287 k = 288 k = 289 k = 290 k = 291 k = 292 k = 293 k = 294 k = 295 k = 296 k = 297 k = 298 k = 299 k = 300 k = 301 k = 302 k = 303 k = 304 k = 305 k = 306 k = 307 k = 308 k = 309 k = 310 k = 311 k = 312 k = 313 k = 314 k = 315 k = 316 k = 317 k = 318 k = 319 k = 320 k = 321 k = 322 k = 323 k = 324 k = 325 k = 326 k = 327 k = 328 k = 329 k = 330 k = 331 k = 332 k = 333 k = 334 k = 335 k = 336 k = 337 k = 338 k = 339 k = 340 k = 341 k = 342 k = 343 k = 344 k = 345 k = 346 k = 347 k = 348 k = 349 k = 350 k = 351 k = 352 k = 353 k = 354 k = 355 k = 356 k = 357 k = 358 k = 359 k = 360 k = 361 k = 362 k = 363 k = 364 k = 365 k = 366 k = 367 k = 368 k = 369

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))

k = 1 k = 1 k = 1 k = 2 k = 3 k = 4 k = 5 k = 1 k = 2 k = 3 k = 1 k = 2 k = 3 k = 4 k = 5 k = 6 k = 7 k = 8 k = 9 k = 10 k = 11 k = 1 k = 2 k = 3 k = 4 k = 5 k = 6 k = 7 k = 1 k = 2 k = 3 k = 4 k = 5 k = 6 k = 7 k = 8 k = 9 k = 10 k = 11 k = 12 k = 13 k = 14 k = 15 k = 16 k = 17 k = 18 k = 19 k = 20 k = 21 k = 22 k = 23 k = 1 k = 2 k = 3 k = 4 k = 5 k = 6 k = 7 k = 8 k = 9 k = 10 k = 11 k = 12 k = 13 k = 14 k = 15 k = 1 k = 2 k = 3 k = 4 k = 5 k = 6 k = 7 k = 8 k = 9 k = 10 k = 11 k = 12 k = 13 k = 14 k = 15 k = 16 k = 17 k = 18 k = 19 k = 20 k = 21 k = 22 k = 23 k = 24 k = 25 k = 26 k = 27 k = 28 k = 29 k = 30 k = 31 k = 32 k = 33 k = 34 k = 35 k = 36 k = 37 k = 38 k = 39 k = 40 k = 41 k = 42 k = 43 k = 44 k = 45 k = 46 k = 47 k = 1 k = 2 k = 3 k = 4 k = 5 k = 6 k = 7 k = 8 k = 9 k = 10 k = 11 k = 12 k = 13 k = 14 k = 15 k = 16 k = 17 k = 18 k = 19 k = 20 k = 21 k = 22 k = 23 k = 24 k = 25 k = 26 k = 27 k = 28 k = 29 k = 30 k = 31 k = 1 k = 2 k = 3 k = 4 k = 5 k = 6 k = 7 k = 8 k = 9 k = 10 k = 11 k = 12 k = 13 k = 14 k = 15 k = 16 k = 17 k = 18 k = 19 k = 20 k = 21 k = 22 k = 23 k = 24 k = 25 k = 26 k = 27 k = 28 k = 29 k = 30 k = 31 k = 32 k = 33 k = 34 k = 35 k = 36 k = 37 k = 38 k = 39 k = 40 k = 41 k = 42 k = 43 k = 44 k = 45 k = 46 k = 47 k = 48 k = 49 k = 50 k = 51 k = 52 k = 53 k = 54 k = 55 k = 56 k = 57 k = 58 k = 59 k = 60 k = 61 k = 62 k = 63 k = 64 k = 65 k = 66 k = 67 k = 68 k = 69 k = 70 k = 71 k = 72 k = 73 k = 74 k = 75 k = 76 k = 77 k = 78 k = 79 k = 80 k = 81 k = 82 k = 83 k = 84 k = 85 k = 86 k = 87 k = 88 k = 89 k = 90 k = 91 k = 92 k = 93 k = 94 k = 95 k = 1 k = 2 k = 3 k = 4 k = 5 k = 6 k = 7 k = 8 k = 9 k = 10 k = 11 k = 12 k = 13 k = 14 k = 15 k = 16 k = 17 k = 18 k = 19 k = 20 k = 21 k = 22 k = 23 k = 24 k = 25 k = 26 k = 27 k = 28 k = 29 k = 30 k = 31 k = 32 k = 33 k = 34 k = 35 k = 36 k = 37 k = 38 k = 39 k = 40 k = 41 k = 42 k = 43 k = 44 k = 45 k = 46 k = 47 k = 48 k = 49 k = 50 k = 51 k = 52 k = 53 k = 54 k = 55 k = 56 k = 57 k = 58 k = 59 k = 60 k = 61 k = 62 k = 63 k = 1 k = 2 k = 3 k = 4 k = 5 k = 6 k = 7 k = 8 k = 9 k = 10 k = 11 k = 12 k = 13 k = 14 k = 15 k = 16 k = 17 k = 18 k = 19 k = 20 k = 21 k = 22 k = 23 k = 24 k = 25 k = 26 k = 27 k = 28 k = 29 k = 30 k = 31 k = 32 k = 33 k = 34 k = 35 k = 36 k = 37 k = 38 k = 39 k = 40 k = 41 k = 42 k = 43 k = 44 k = 45 k = 46 k = 47 k = 48 k = 49 k = 50 k = 51 k = 52 k = 53 k = 54 k = 55 k = 56 k = 57 k = 58 k = 59 k = 60 k = 61 k = 62 k = 63 k = 64 k = 65 k = 66 k = 67 k = 68 k = 69 k = 70 k = 71 k = 72 k = 73 k = 74 k = 75 k = 76 k = 77 k = 78 k = 79 k = 80 k = 81 k = 82 k = 83 k = 84 k = 85 k = 86 k = 87 k = 88 k = 89 k = 90 k = 91 k = 92 k = 93 k = 94 k = 95 k = 96 k = 97 k = 98 k = 99 k = 100 k = 101 k = 102 k = 103 k = 104 k = 105 k = 106 k = 107 k = 108 k = 109 k = 110 k = 111 k = 112 k = 113 k = 114 k = 115 k = 116 k = 117 k = 118 k = 119 k = 120 k = 121 k = 122 k = 123 k = 124 k = 125 k = 126 k = 127 k = 128 k = 129 k = 130 k = 131 k = 132 k = 133 k = 134 k = 135 k = 136 k = 137 k = 138 k = 139 k = 140 k = 141 k = 142 k = 143 k = 144 k = 145 k = 146 k = 147 k = 148 k = 149 k = 150 k = 151 k = 152 k = 153 k = 154 k = 155 k = 156 k = 157 k = 158 k = 159 k = 160 k = 161 k = 162 k = 163 k = 164 k = 165 k = 166 k = 167 k = 168 k = 169 k = 170 k = 171 k = 172 k = 173 k = 174 k = 175 k = 176 k = 177 k = 178 k = 179 k = 180 k = 181 k = 182 k = 183 k = 184 k = 185 k = 186 k = 187 k = 188 k = 189 k = 190 k = 191 k = 1 k = 2 k = 3 k = 4 k = 5 k = 6 k = 7 k = 8 k = 9 k = 10 k = 11 k = 12 k = 13 k = 14 k = 15 k = 16 k = 17 k = 18 k = 19 k = 20 k = 21 k = 22 k = 23 k = 24 k = 25 k = 26 k = 27 k = 28 k = 29 k = 30 k = 31 k = 32 k = 33 k = 34 k = 35 k = 36 k = 37 k = 38 k = 39 k = 40 k = 41 k = 42 k = 43 k = 44 k = 45 k = 46 k = 47 k = 48 k = 49 k = 50 k = 51 k = 52 k = 53 k = 54 k = 55 k = 56 k = 57 k = 58 k = 59 k = 60 k = 61 k = 62 k = 63 k = 64 k = 65 k = 66 k = 67 k = 68 k = 69 k = 70 k = 71 k = 72 k = 73 k = 74 k = 75 k = 76 k = 77 k = 78 k = 79 k = 80 k = 81 k = 82 k = 83 k = 84 k = 85 k = 86 k = 87 k = 88 k = 89 k = 90 k = 91 k = 92 k = 93 k = 94 k = 95 k = 96 k = 97 k = 98 k = 99 k = 100 k = 101 k = 102 k = 103 k = 104 k = 105 k = 106 k = 107 k = 108 k = 109 k = 110 k = 111 k = 112 k = 113 k = 114 k = 115 k = 116 k = 117 k = 118 k = 119 k = 120 k = 121 k = 122 k = 123 k = 124 k = 125 k = 126 k = 127 k = 1 k = 2 k = 3 k = 4 k = 5 k = 6 k = 7 k = 8 k = 9 k = 10 k = 11 k = 12 k = 13 k = 14 k = 15 k = 16 k = 17 k = 18 k = 19 k = 20 k = 21 k = 22 k = 23 k = 24 k = 25 k = 26 k = 27 k = 28 k = 29 k = 30 k = 31 k = 32 k = 33 k = 34 k = 35 k = 36 k = 37 k = 38 k = 39 k = 40 k = 41 k = 42 k = 43 k = 44 k = 45 k = 46 k = 47 k = 48 k = 49 k = 50 k = 51 k = 52 k = 53 k = 54 k = 55 k = 56 k = 57 k = 58 k = 59 k = 60 k = 61 k = 62 k = 63 k = 64 k = 65 k = 66 k = 67 k = 68 k = 69 k = 70 k = 71 k = 72 k = 73 k = 74 k = 75 k = 76 k = 77 k = 78 k = 79 k = 80 k = 81 k = 82 k = 83 k = 84 k = 85 k = 86 k = 87 k = 88 k = 89 k = 90 k = 91 k = 92 k = 93 k = 94 k = ...