Cody

Solution 2012262

Submitted on 10 Nov 2019 by Doan Quang Manh
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))

c = 1882 c = 1883 c = 1884 c = 1885 c = 1886 c = 1887 c = 1888 c = 1889 c = 1890 c = 1891 c = 1892 c = 1893 c = 1894 c = 1895 c = 1896 c = 1897 c = 1898 c = 1899 c = 1900 c = 1901 c = 1902 c = 1903 c = 1904 c = 1905 c = 1906 c = 1907 c = 1908 c = 1909 c = 1910 c = 1911 y = 30

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

c = 2015 y = 1

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

y = 0

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

c = 607 c = 608 c = 609 c = 610 c = 611 c = 612 c = 613 c = 614 c = 615 c = 616 c = 617 c = 618 c = 619 c = 620 c = 621 c = 622 c = 623 c = 624 c = 625 c = 626 c = 627 c = 628 c = 629 c = 630 c = 631 c = 632 c = 633 y = 27

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

c = 6007 c = 6008 c = 6009 c = 6010 c = 6011 c = 6012 c = 6013 c = 6014 c = 6015 c = 6016 c = 6017 c = 6018 c = 6019 c = 6020 c = 6021 c = 6022 c = 6023 c = 6024 c = 6025 c = 6026 c = 6027 c = 6028 c = 6029 c = 6030 c = 6031 c = 6032 c = 6033 c = 6034 c = 6035 c = 6036 c = 6037 c = 6038 c = 6039 c = 6040 c = 6041 c = 6042 c = 6043 c = 6044 c = 6045 c = 6046 c = 6047 c = 6048 c = 6049 c = 6050 c = 6051 c = 6052 c = 6053 c = 6054 c = 6055 c = 6056 c = 6057 c = 6058 c = 6059 c = 6060 c = 6061 c = 6062 c = 6063 c = 6064 c = 6065 c = 6066 c = 6067 c = 6068 c = 6069 c = 6070 c = 6071 c = 6072 c = 6073 c = 6074 c = 6075 c = 6076 c = 6077 y = 71

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

c = 60007 c = 60008 c = 60009 c = 60010 c = 60011 c = 60012 c = 60013 c = 60014 c = 60015 c = 60016 c = 60017 c = 60018 c = 60019 c = 60020 c = 60021 c = 60022 c = 60023 c = 60024 c = 60025 c = 60026 c = 60027 c = 60028 c = 60029 c = 60030 c = 60031 c = 60032 c = 60033 c = 60034 c = 60035 c = 60036 c = 60037 c = 60038 c = 60039 c = 60040 c = 60041 c = 60042 c = 60043 c = 60044 c = 60045 c = 60046 c = 60047 c = 60048 c = 60049 c = 60050 c = 60051 c = 60052 c = 60053 c = 60054 c = 60055 c = 60056 c = 60057 c = 60058 c = 60059 c = 60060 c = 60061 c = 60062 c = 60063 c = 60064 c = 60065 c = 60066 c = 60067 c = 60068 c = 60069 c = 60070 c = 60071 c = 60072 c = 60073 c = 60074 c = 60075 c = 60076 c = 60077 c = 60078 c = 60079 c = 60080 c = 60081 c = 60082 c = 60083 c = 60084 c = 60085 c = 60086 c = 60087 c = 60088 c = 60089 c = 60090 c = 60091 c = 60092 c = 60093 c = 60094 c = 60095 c = 60096 c = 60097 c = 60098 c = 60099 c = 60100 c = 60101 c = 60102 c = 60103 c = 60104 c = 60105 c = 60106 c = 60107 c = 60108 c = 60109 c = 60110 c = 60111 c = 60112 c = 60113 c = 60114 c = 60115 c = 60116 c = 60117 c = 60118 c = 60119 c = 60120 c = 60121 c = 60122 c = 60123 c = 60124 c = 60125 c = 60126 c = 60127 c = 60128 c = 60129 c = 60130 c = 60131 c = 60132 c = 60133 c = 60134 c = 60135 c = 60136 c = 60137 c = 60138 c = 60139 c = 60140 c = 60141 c = 60142 c = 60143 c = 60144 c = 60145 c = 60146 c = 60147 c = 60148 c = 60149 c = 60150 c = 60151 c = 60152 c = 60153 c = 60154 c = 60155 c = 60156 c = 60157 c = 60158 c = 60159 c = 60160 c = 60161 c = 60162 c = 60163 c = 60164 c = 60165 c = 60166 c = 60167 c = 60168 c = 60169 c = 60170 c = 60171 c = 60172 c = 60173 c = 60174 c = 60175 c = 60176 c = 60177 c = 60178 c = 60179 c = 60180 c = 60181 c = 60182 c = 60183 c = 60184 c = 60185 c = 60186 c = 60187 c = 60188 c = 60189 c = 60190 c = 60191 c = 60192 c = 60193 c = 60194 c = 60195 c = 60196 c = 60197 c = 60198 c = 60199 c = 60200 c = 60201 c = 60202 c = 60203 c = 60204 c = 60205 c = 60206 c = 60207 c = 60208 c = 60209 c = 60210 c = 60211 c = 60212 c = 60213 c = 60214 c = 60215 c = 60216 c = 60217 c = 60218 c = 60219 c = 60220 c = 60221 c = 60222 c = 60223 c = 60224 c = 60225 c = 60226 c = 60227 c = 60228 c = 60229 c = 60230 c = 60231 c = 60232 c = 60233 c = 60234 c = 60235 c = 60236 c = 60237 c = 60238 c = 60239 c = 60240 c = 60241 c = 60242 c = 60243 c = 60244 c = 60245 c = 60246 c = 60247 c = 60248 c = 60249 c = 60250 c = 60251 c = 60252 c = 60253 c = 60254 c = 60255 c = 60256 c = 60257 c = 60258 c = 60259 c = 60260 c = 60261 c = 60262 c = 60263 c = 60264 c = 60265 c = 60266 c = 60267 c = 60268 c = 60269 c = 60270 c = 60271 c = 60272 c = 60273 c = 60274 c = 60275 c = 60276 c = 60277 c = 60278 c = 60279 c = 60280 c = 60281 c = 60282 c = 60283 c = 60284 c = 60285 c = 60286 c = 60287 c = 60288 c = 60289 c = 60290 c = 60291 c = 60292 c = 60293 c = 60294 c = 60295 c = 60296 c = 60297 c = 60298 c = 60299 c = 60300 c = 60301 c = 60302 c = 60303 c = 60304 c = 60305 c = 60306 c = 60307 c = 60308 c = 60309 c = 60310 c = 60311 c = 60312 c = 60313 c = 60314 c = 60315 c = 60316 c = 60317 c = 60318 c = 60319 c = 60320 c = 60321 c = 60322 c = 60323 c = 60324 c = 60325 c = 60326 c = 60327 c = 60328 c = 60329 c = 60330 c = 60331 c = 60332 c = 60333 c = 60334 c = 60335 c = 60336 c = 60337 c = 60338 c = 60339 c = 60340 c = 60341 c = 60342 c = 60343 c = 60344 c = 60345 c = 60346 c = 60347 c = 60348 c = 60349 c = 60350 c = 60351 c = 60352 c = 60353 c = 60354 c = 60355 c = 60356 c = 60357 c = 60358 c = 60359 c = 60360 c = 60361 c = 60362 c = 60363 c = 60364 c = 60365 c = 60366 c = 60367 c = 60368 c = 60369 c = 60370 c = 60371 c = 60372 c = 60373 c = 60374 c = 60375 y = 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))

c = 5 y = 1 c = 7 y = 1 c = 11 c = 12 c = 13 c = 14 c = 15 y = 5 c = 19 c = 20 c = 21 y = 3 c = 35 c = 36 c = 37 c = 38 c = 39 c = 40 c = 41 c = 42 c = 43 c = 44 c = 45 y = 11 c = 67 c = 68 c = 69 c = 70 c = 71 c = 72 c = 73 y = 7 c = 131 c = 132 c = 133 c = 134 c = 135 c = 136 c = 137 c = 138 c = 139 c = 140 c = 141 c = 142 c = 143 c = 144 c = 145 c = 146 c = 147 c = 148 c = 149 c = 150 c = 151 c = 152 c = 153 y = 23 c = 259 c = 260 c = 261 c = 262 c = 263 c = 264 c = 265 c = 266 c = 267 c = 268 c = 269 c = 270 c = 271 c = 272 c = 273 y = 15 c = 515 c = 516 c = 517 c = 518 c = 519 c = 520 c = 521 c = 522 c = 523 c = 524 c = 525 c = 526 c = 527 c = 528 c = 529 c = 530 c = 531 c = 532 c = 533 c = 534 c = 535 c = 536 c = 537 c = 538 c = 539 c = 540 c = 541 c = 542 c = 543 c = 544 c = 545 c = 546 c = 547 c = 548 c = 549 c = 550 c = 551 c = 552 c = 553 c = 554 c = 555 c = 556 c = 557 c = 558 c = 559 c = 560 c = 561 y = 47 c = 1027 c = 1028 c = 1029 c = 1030 c = 1031 c = 1032 c = 1033 c = 1034 c = 1035 c = 1036 c = 1037 c = 1038 c = 1039 c = 1040 c = 1041 c = 1042 c = 1043 c = 1044 c = 1045 c = 1046 c = 1047 c = 1048 c = 1049 c = 1050 c = 1051 c = 1052 c = 1053 c = 1054 c = 1055 c = 1056 c = 1057 y = 31 c = 2051 c = 2052 c = 2053 c = 2054 c = 2055 c = 2056 c = 2057 c = 2058 c = 2059 c = 2060 c = 2061 c = 2062 c = 2063 c = 2064 c = 2065 c = 2066 c = 2067 c = 2068 c = 2069 c = 2070 c = 2071 c = 2072 c = 2073 c = 2074 c = 2075 c = 2076 c = 2077 c = 2078 c = 2079 c = 2080 c = 2081 c = 2082 c = 2083 c = 2084 c = 2085 c = 2086 c = 2087 c = 2088 c = 2089 c = 2090 c = 2091 c = 2092 c = 2093 c = 2094 c = 2095 c = 2096 c = 2097 c = 2098 c = 2099 c = 2100 c = 2101 c = 2102 c = 2103 c = 2104 c = 2105 c = 2106 c = 2107 c = 2108 c = 2109 c = 2110 c = 2111 c = 2112 c = 2113 c = 2114 c = 2115 c = 2116 c = 2117 c = 2118 c = 2119 c = 2120 c = 2121 c = 2122 c = 2123 c = 2124 c = 2125 c = 2126 c = 2127 c = 2128 c = 2129 c = 2130 c = 2131 c = 2132 c = 2133 c = 2134 c = 2135 c = 2136 c = 2137 c = 2138 c = 2139 c = 2140 c = 2141 c = 2142 c = 2143 c = 2144 c = 2145 y = 95 c = 4099 c = 4100 c = 4101 c = 4102 c = 4103 c = 4104 c = 4105 c = 4106 c = 4107 c = 4108 c = 4109 c = 4110 c = 4111 c = 4112 c = 4113 c = 4114 c = 4115 c = 4116 c = 4117 c = 4118 c = 4119 c = 4120 c = 4121 c = 4122 c = 4123 c = 4124 c = 4125 c = 4126 c = 4127 c = 4128 c = 4129 c = 4130 c = 4131 c = 4132 c = 4133 c = 4134 c = 4135 c = 4136 c = 4137 c = 4138 c = 4139 c = 4140 c = 4141 c = 4142 c = 4143 c = 4144 c = 4145 c = 4146 c = 4147 c = 4148 c = 4149 c = 4150 c = 4151 c = 4152 c = 4153 c = 4154 c = 4155 c = 4156 c = 4157 c = 4158 c = 4159 c = 4160 c = 4161 y = 63 c = 8195 c = 8196 c = 8197 c = 8198 c = 8199 c = 8200 c = 8201 c = 8202 c = 8203 c = 8204 c = 8205 c = 8206 c = 8207 c = 8208 c = 8209 c = 8210 c = 8211 c = 8212 c = 8213 c = 8214 c = 8215 c = 8216 c = 8217 c = 8218 c = 8219 c = 8220 c = 8221 c = 8222 c = 8223 c = 8224 c = 8225 c = 8226 c = 8227 c = 8228 c = 8229 c = 8230 c = 8231 c = 8232 c = 8233 c = 8234 c = 8235 c = 8236 c = 8237 c = 8238 c = 8239 c = 8240 c = 8241 c = 8242 c = 8243 c = 8244 c = 8245 c = 8246 c = 8247 c = 8248 c = 8249 c = 8250 c = 8251 c = 8252 c = 8253 c = 8254 c = 8255 c = 8256 c = 8257 c = 8258 c = 8259 c = 8260 c = 8261 c = 8262 c = 8263 c = 8264 c = 8265 c = 8266 c = 8267 c = 8268 c = 8269 c = 8270 c = 8271 c = 8272 c = 8273 c = 8274 c = 8275 c = 8276 c = 8277 c = 8278 c = 8279 c = 8280 c = 8281 c = 8282 c = 8283 c = 8284 c = 8285 c = 8286 c = 8287 c = 8288 c = 8289 c = 8290 c = 8291 c = 8292 c = 8293 c = 8294 c = 8295 c = 8296 c = 8297 c = 8298 c = 8299 c = 8300 c = 8301 c = 8302 c = 8303 c = 8304 c = 8305 c = 8306 c = 8307 c = 8308 c = 8309 c = 8310 c = 8311 c = 8312 c = 8313 c = 8314 c = 8315 c = 8316 c = 8317 c = 8318 c = 8319 c = 8320 c = 8321 c = 8322 c = 8323 c = 8324 c = 8325 c = 8326 c = 8327 c = 8328 c = 8329 c = 8330 c = 8331 c = 8332 c = 8333 c = 8334 c = 8335 c = 8336 c = 8337 c = 8338 c = 8339 c = 8340 c = 8341 c = 8342 c = 8343 c = 8344 c = 8345 c = 8346 c = 8347 c = 8348 c = 8349 c = 8350 c = 8351 c = 8352 c = 8353 c = 8354 c = 8355 c = 8356 c = 8357 c = 8358 c = 8359 c = 8360 c = 8361 c = 8362 c = 8363 c = 8364 c = 8365 c = 8366 c = 8367 c = 8368 c = 8369 c = 8370 c = 8371 c = 8372 c = 8373 c = 8374 c = 8375 c = 8376 c = 8377 c = 8378 c = 8379 c = 8380 c = 8381 c = 8382 c = 8383 c = 8384 c = 8385 y = 191 c = 16387 c = 16388 c = 16389 c = 16390 c = 16391 c = 16392 c = 16393 c = 16394 c = 16395 c = 16396 c = 16397 c = 16398 c = 16399 c = 16400 c = 16401 c = 16402 c = 16403 c = 16404 c = 16405 c = 16406 c = 16407 c = 16408 c = 16409 c = 16410 c = 16411 c = 16412 c = 16413 c = 16414 c = 16415 c = 16416 c = 16417 c = 1641...