Cody

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

Solution 1825800

Submitted on 25 May 2019 by A C
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))

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

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

count = 0 count = 1

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

count = 0

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

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

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

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

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

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

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