#include <iostream> #include <vector> using namespace std; signed long int cmb[483]; int main() { cmb[0]=1; cmb[1]=2; cmb[2]=3; cmb[3]=4; cmb[4]=5; cmb[5]=6; cmb[6]=8; cmb[7]=9; cmb[8]=10; cmb[9]=13; cmb[10]=15; cmb[11]=16; cmb[12]=21; cmb[13]=24; cmb[14]=25; cmb[15]=26; cmb[16]=34; cmb[17]=39; cmb[18]=40; cmb[19]=42; cmb[20]=55; cmb[21]=63; cmb[22]=64; cmb[23]=65; cmb[24]=68; cmb[25]=89; cmb[26]=102; cmb[27]=104; cmb[28]=105; cmb[29]=110; cmb[30]=144; cmb[31]=165; cmb[32]=168; cmb[33]=169; cmb[34]=170; cmb[35]=178; cmb[36]=233; cmb[37]=267; cmb[38]=272; cmb[39]=273; cmb[40]=275; cmb[41]=288; cmb[42]=377; cmb[43]=432; cmb[44]=440; cmb[45]=441; cmb[46]=442; cmb[47]=445; cmb[48]=466; cmb[49]=610; cmb[50]=699; cmb[51]=712; cmb[52]=714; cmb[53]=715; cmb[54]=720; cmb[55]=754; cmb[56]=987; cmb[57]=1131; cmb[58]=1152; cmb[59]=1155; cmb[60]=1156; cmb[61]=1157; cmb[62]=1165; cmb[63]=1220; cmb[64]=1597; cmb[65]=1830; cmb[66]=1864; cmb[67]=1869; cmb[68]=1870; cmb[69]=1872; cmb[70]=1885; cmb[71]=1974; cmb[72]=2584; cmb[73]=2961; cmb[74]=3016; cmb[75]=3024; cmb[76]=3025; cmb[77]=3026; cmb[78]=3029; cmb[79]=3050; cmb[80]=3194; cmb[81]=4181; cmb[82]=4791; cmb[83]=4880; cmb[84]=4893; cmb[85]=4895; cmb[86]=4896; cmb[87]=4901; cmb[88]=4935; cmb[89]=5168; cmb[90]=6765; cmb[91]=7752; cmb[92]=7896; cmb[93]=7917; cmb[94]=7920; cmb[95]=7921; cmb[96]=7922; cmb[97]=7930; cmb[98]=7985; cmb[99]=8362; cmb[100]=10946; cmb[101]=12543; cmb[102]=12776; cmb[103]=12810; cmb[104]=12815; cmb[105]=12816; cmb[106]=12818; cmb[107]=12831; cmb[108]=12920; cmb[109]=13530; cmb[110]=17711; cmb[111]=20295; cmb[112]=20672; cmb[113]=20727; cmb[114]=20735; cmb[115]=20736; cmb[116]=20737; cmb[117]=20740; cmb[118]=20761; cmb[119]=20905; cmb[120]=21892; cmb[121]=28657; cmb[122]=32838; cmb[123]=33448; cmb[124]=33537; cmb[125]=33550; cmb[126]=33552; cmb[127]=33553; cmb[128]=33558; cmb[129]=33592; cmb[130]=33825; cmb[131]=35422; cmb[132]=46368; cmb[133]=53133; cmb[134]=54120; cmb[135]=54264; cmb[136]=54285; cmb[137]=54288; cmb[138]=54289; cmb[139]=54290; cmb[140]=54298; cmb[141]=54353; cmb[142]=54730; cmb[143]=57314; cmb[144]=75025; cmb[145]=85971; cmb[146]=87568; cmb[147]=87801; cmb[148]=87835; cmb[149]=87840; cmb[150]=87841; cmb[151]=87843; cmb[152]=87856; cmb[153]=87945; cmb[154]=88555; cmb[155]=92736; cmb[156]=121393; cmb[157]=139104; cmb[158]=141688; cmb[159]=142065; cmb[160]=142120; cmb[161]=142128; cmb[162]=142129; cmb[163]=142130; cmb[164]=142133; cmb[165]=142154; cmb[166]=142298; cmb[167]=143285; cmb[168]=150050; cmb[169]=196418; cmb[170]=225075; cmb[171]=229256; cmb[172]=229866; cmb[173]=229955; cmb[174]=229968; cmb[175]=229970; cmb[176]=229971; cmb[177]=229976; cmb[178]=230010; cmb[179]=230243; cmb[180]=231840; cmb[181]=242786; cmb[182]=317811; cmb[183]=364179; cmb[184]=370944; cmb[185]=371931; cmb[186]=372075; cmb[187]=372096; cmb[188]=372099; cmb[189]=372100; cmb[190]=372101; cmb[191]=372109; cmb[192]=372164; cmb[193]=372541; cmb[194]=375125; cmb[195]=392836; cmb[196]=514229; cmb[197]=589254; cmb[198]=600200; cmb[199]=601797; cmb[200]=602030; cmb[201]=602064; cmb[202]=602069; cmb[203]=602070; cmb[204]=602072; cmb[205]=602085; cmb[206]=602174; cmb[207]=602784; cmb[208]=606965; cmb[209]=635622; cmb[210]=832040; cmb[211]=953433; cmb[212]=971144; cmb[213]=973728; cmb[214]=974105; cmb[215]=974160; cmb[216]=974168; cmb[217]=974169; cmb[218]=974170; cmb[219]=974173; cmb[220]=974194; cmb[221]=974338; cmb[222]=975325; cmb[223]=982090; cmb[224]=1028458; cmb[225]=1346269; cmb[226]=1542687; cmb[227]=1571344; cmb[228]=1575525; cmb[229]=1576135; cmb[230]=1576224; cmb[231]=1576237; cmb[232]=1576239; cmb[233]=1576240; cmb[234]=1576245; cmb[235]=1576279; cmb[236]=1576512; cmb[237]=1578109; cmb[238]=1589055; cmb[239]=1664080; cmb[240]=2178309; cmb[241]=2496120; cmb[242]=2542488; cmb[243]=2549253; cmb[244]=2550240; cmb[245]=2550384; cmb[246]=2550405; cmb[247]=2550408; cmb[248]=2550409; cmb[249]=2550410; cmb[250]=2550418; cmb[251]=2550473; cmb[252]=2550850; cmb[253]=2553434; cmb[254]=2571145; cmb[255]=2692538; cmb[256]=3524578; cmb[257]=4038807; cmb[258]=4113832; cmb[259]=4124778; cmb[260]=4126375; cmb[261]=4126608; cmb[262]=4126642; cmb[263]=4126647; cmb[264]=4126648; cmb[265]=4126650; cmb[266]=4126663; cmb[267]=4126752; cmb[268]=4127362; cmb[269]=4131543; cmb[270]=4160200; cmb[271]=4356618; cmb[272]=5702887; cmb[273]=6534927; cmb[274]=6656320; cmb[275]=6674031; cmb[276]=6676615; cmb[277]=6676992; cmb[278]=6677047; cmb[279]=6677055; cmb[280]=6677056; cmb[281]=6677057; cmb[282]=6677060; cmb[283]=6677081; cmb[284]=6677225; cmb[285]=6678212; cmb[286]=6684977; cmb[287]=6731345; cmb[288]=7049156; cmb[289]=9227465; cmb[290]=10573734; cmb[291]=10770152; cmb[292]=10798809; cmb[293]=10802990; cmb[294]=10803600; cmb[295]=10803689; cmb[296]=10803702; cmb[297]=10803704; cmb[298]=10803705; cmb[299]=10803710; cmb[300]=10803744; cmb[301]=10803977; cmb[302]=10805574; cmb[303]=10816520; cmb[304]=10891545; cmb[305]=11405774; cmb[306]=14930352; cmb[307]=17108661; cmb[308]=17426472; cmb[309]=17472840; cmb[310]=17479605; cmb[311]=17480592; cmb[312]=17480736; cmb[313]=17480757; cmb[314]=17480760; cmb[315]=17480761; cmb[316]=17480762; cmb[317]=17480770; cmb[318]=17480825; cmb[319]=17481202; cmb[320]=17483786; cmb[321]=17501497; cmb[322]=17622890; cmb[323]=18454930; cmb[324]=24157817; cmb[325]=27682395; cmb[326]=28196624; cmb[327]=28271649; cmb[328]=28282595; cmb[329]=28284192; cmb[330]=28284425; cmb[331]=28284459; cmb[332]=28284464; cmb[333]=28284465; cmb[334]=28284467; cmb[335]=28284480; cmb[336]=28284569; cmb[337]=28285179; cmb[338]=28289360; cmb[339]=28318017; cmb[340]=28514435; cmb[341]=29860704; cmb[342]=39088169; cmb[343]=44791056; cmb[344]=45623096; cmb[345]=45744489; cmb[346]=45762200; cmb[347]=45764784; cmb[348]=45765161; cmb[349]=45765216; cmb[350]=45765224; cmb[351]=45765225; cmb[352]=45765226; cmb[353]=45765229; cmb[354]=45765250; cmb[355]=45765394; cmb[356]=45766381; cmb[357]=45773146; cmb[358]=45819514; cmb[359]=46137325; cmb[360]=48315634; cmb[361]=63245986; cmb[362]=72473451; cmb[363]=73819720; cmb[364]=74016138; cmb[365]=74044795; cmb[366]=74048976; cmb[367]=74049586; cmb[368]=74049675; cmb[369]=74049688; cmb[370]=74049690; cmb[371]=74049691; cmb[372]=74049696; cmb[373]=74049730; cmb[374]=74049963; cmb[375]=74051560; cmb[376]=74062506; cmb[377]=74137531; cmb[378]=74651760; cmb[379]=78176338; cmb[380]=102334155; cmb[381]=117264507; cmb[382]=119442816; cmb[383]=119760627; cmb[384]=119806995; cmb[385]=119813760; cmb[386]=119814747; cmb[387]=119814891; cmb[388]=119814912; cmb[389]=119814915; cmb[390]=119814916; cmb[391]=119814917; cmb[392]=119814925; cmb[393]=119814980; cmb[394]=119815357; cmb[395]=119817941; cmb[396]=119835652; cmb[397]=119957045; cmb[398]=120789085; cmb[399]=126491972; cmb[400]=165580141; cmb[401]=189737958; cmb[402]=193262536; cmb[403]=193776765; cmb[404]=193851790; cmb[405]=193862736; cmb[406]=193864333; cmb[407]=193864566; cmb[408]=193864600; cmb[409]=193864605; cmb[410]=193864606; cmb[411]=193864608; cmb[412]=193864621; cmb[413]=193864710; cmb[414]=193865320; cmb[415]=193869501; cmb[416]=193898158; cmb[417]=194094576; cmb[418]=195440845; cmb[419]=204668310; cmb[420]=267914296; cmb[421]=307002465; cmb[422]=312705352; cmb[423]=313537392; cmb[424]=313658785; cmb[425]=313676496; cmb[426]=313679080; cmb[427]=313679457; cmb[428]=313679512; cmb[429]=313679520; cmb[430]=313679521; cmb[431]=313679522; cmb[432]=313679525; cmb[433]=313679546; cmb[434]=313679690; cmb[435]=313680677; cmb[436]=313687442; cmb[437]=313733810; cmb[438]=314051621; cmb[439]=316229930; cmb[440]=331160282; cmb[441]=433494437; cmb[442]=496740423; cmb[443]=505967888; cmb[444]=507314157; cmb[445]=507510575; cmb[446]=507539232; cmb[447]=507543413; cmb[448]=507544023; cmb[449]=507544112; cmb[450]=507544125; cmb[451]=507544127; cmb[452]=507544128; cmb[453]=507544133; cmb[454]=507544167; cmb[455]=507544400; cmb[456]=507545997; cmb[457]=507556943; cmb[458]=507631968; cmb[459]=508146197; cmb[460]=511670775; cmb[461]=535828592; cmb[462]=701408733; cmb[463]=803742888; cmb[464]=818673240; cmb[465]=820851549; cmb[466]=821169360; cmb[467]=821215728; cmb[468]=821222493; cmb[469]=821223480; cmb[470]=821223624; cmb[471]=821223645; cmb[472]=821223648; cmb[473]=821223649; cmb[474]=821223650; cmb[475]=821223658; cmb[476]=821223713; cmb[477]=821224090; cmb[478]=821226674; cmb[479]=821244385; cmb[480]=821365778; cmb[481]=822197818; cmb[482]=827900705; cmb[483]=866988874; vector<signed long int> v; int n; signed long int k; cin >> n; for (int i=1;i<=n;++i) { cin >> k; v.push_back(k); } for (int i=0;i<=n-1;++i) { bool fib = false; for (int j=0;j<=483;++j) { if (v[i]==cmb[j]) { fib = true; break; } } if (fib == true) cout << "TAK" << endl; else cout << "NIE" << endl; } }
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 | #include <iostream> #include <vector> using namespace std; signed long int cmb[483]; int main() { cmb[0]=1; cmb[1]=2; cmb[2]=3; cmb[3]=4; cmb[4]=5; cmb[5]=6; cmb[6]=8; cmb[7]=9; cmb[8]=10; cmb[9]=13; cmb[10]=15; cmb[11]=16; cmb[12]=21; cmb[13]=24; cmb[14]=25; cmb[15]=26; cmb[16]=34; cmb[17]=39; cmb[18]=40; cmb[19]=42; cmb[20]=55; cmb[21]=63; cmb[22]=64; cmb[23]=65; cmb[24]=68; cmb[25]=89; cmb[26]=102; cmb[27]=104; cmb[28]=105; cmb[29]=110; cmb[30]=144; cmb[31]=165; cmb[32]=168; cmb[33]=169; cmb[34]=170; cmb[35]=178; cmb[36]=233; cmb[37]=267; cmb[38]=272; cmb[39]=273; cmb[40]=275; cmb[41]=288; cmb[42]=377; cmb[43]=432; cmb[44]=440; cmb[45]=441; cmb[46]=442; cmb[47]=445; cmb[48]=466; cmb[49]=610; cmb[50]=699; cmb[51]=712; cmb[52]=714; cmb[53]=715; cmb[54]=720; cmb[55]=754; cmb[56]=987; cmb[57]=1131; cmb[58]=1152; cmb[59]=1155; cmb[60]=1156; cmb[61]=1157; cmb[62]=1165; cmb[63]=1220; cmb[64]=1597; cmb[65]=1830; cmb[66]=1864; cmb[67]=1869; cmb[68]=1870; cmb[69]=1872; cmb[70]=1885; cmb[71]=1974; cmb[72]=2584; cmb[73]=2961; cmb[74]=3016; cmb[75]=3024; cmb[76]=3025; cmb[77]=3026; cmb[78]=3029; cmb[79]=3050; cmb[80]=3194; cmb[81]=4181; cmb[82]=4791; cmb[83]=4880; cmb[84]=4893; cmb[85]=4895; cmb[86]=4896; cmb[87]=4901; cmb[88]=4935; cmb[89]=5168; cmb[90]=6765; cmb[91]=7752; cmb[92]=7896; cmb[93]=7917; cmb[94]=7920; cmb[95]=7921; cmb[96]=7922; cmb[97]=7930; cmb[98]=7985; cmb[99]=8362; cmb[100]=10946; cmb[101]=12543; cmb[102]=12776; cmb[103]=12810; cmb[104]=12815; cmb[105]=12816; cmb[106]=12818; cmb[107]=12831; cmb[108]=12920; cmb[109]=13530; cmb[110]=17711; cmb[111]=20295; cmb[112]=20672; cmb[113]=20727; cmb[114]=20735; cmb[115]=20736; cmb[116]=20737; cmb[117]=20740; cmb[118]=20761; cmb[119]=20905; cmb[120]=21892; cmb[121]=28657; cmb[122]=32838; cmb[123]=33448; cmb[124]=33537; cmb[125]=33550; cmb[126]=33552; cmb[127]=33553; cmb[128]=33558; cmb[129]=33592; cmb[130]=33825; cmb[131]=35422; cmb[132]=46368; cmb[133]=53133; cmb[134]=54120; cmb[135]=54264; cmb[136]=54285; cmb[137]=54288; cmb[138]=54289; cmb[139]=54290; cmb[140]=54298; cmb[141]=54353; cmb[142]=54730; cmb[143]=57314; cmb[144]=75025; cmb[145]=85971; cmb[146]=87568; cmb[147]=87801; cmb[148]=87835; cmb[149]=87840; cmb[150]=87841; cmb[151]=87843; cmb[152]=87856; cmb[153]=87945; cmb[154]=88555; cmb[155]=92736; cmb[156]=121393; cmb[157]=139104; cmb[158]=141688; cmb[159]=142065; cmb[160]=142120; cmb[161]=142128; cmb[162]=142129; cmb[163]=142130; cmb[164]=142133; cmb[165]=142154; cmb[166]=142298; cmb[167]=143285; cmb[168]=150050; cmb[169]=196418; cmb[170]=225075; cmb[171]=229256; cmb[172]=229866; cmb[173]=229955; cmb[174]=229968; cmb[175]=229970; cmb[176]=229971; cmb[177]=229976; cmb[178]=230010; cmb[179]=230243; cmb[180]=231840; cmb[181]=242786; cmb[182]=317811; cmb[183]=364179; cmb[184]=370944; cmb[185]=371931; cmb[186]=372075; cmb[187]=372096; cmb[188]=372099; cmb[189]=372100; cmb[190]=372101; cmb[191]=372109; cmb[192]=372164; cmb[193]=372541; cmb[194]=375125; cmb[195]=392836; cmb[196]=514229; cmb[197]=589254; cmb[198]=600200; cmb[199]=601797; cmb[200]=602030; cmb[201]=602064; cmb[202]=602069; cmb[203]=602070; cmb[204]=602072; cmb[205]=602085; cmb[206]=602174; cmb[207]=602784; cmb[208]=606965; cmb[209]=635622; cmb[210]=832040; cmb[211]=953433; cmb[212]=971144; cmb[213]=973728; cmb[214]=974105; cmb[215]=974160; cmb[216]=974168; cmb[217]=974169; cmb[218]=974170; cmb[219]=974173; cmb[220]=974194; cmb[221]=974338; cmb[222]=975325; cmb[223]=982090; cmb[224]=1028458; cmb[225]=1346269; cmb[226]=1542687; cmb[227]=1571344; cmb[228]=1575525; cmb[229]=1576135; cmb[230]=1576224; cmb[231]=1576237; cmb[232]=1576239; cmb[233]=1576240; cmb[234]=1576245; cmb[235]=1576279; cmb[236]=1576512; cmb[237]=1578109; cmb[238]=1589055; cmb[239]=1664080; cmb[240]=2178309; cmb[241]=2496120; cmb[242]=2542488; cmb[243]=2549253; cmb[244]=2550240; cmb[245]=2550384; cmb[246]=2550405; cmb[247]=2550408; cmb[248]=2550409; cmb[249]=2550410; cmb[250]=2550418; cmb[251]=2550473; cmb[252]=2550850; cmb[253]=2553434; cmb[254]=2571145; cmb[255]=2692538; cmb[256]=3524578; cmb[257]=4038807; cmb[258]=4113832; cmb[259]=4124778; cmb[260]=4126375; cmb[261]=4126608; cmb[262]=4126642; cmb[263]=4126647; cmb[264]=4126648; cmb[265]=4126650; cmb[266]=4126663; cmb[267]=4126752; cmb[268]=4127362; cmb[269]=4131543; cmb[270]=4160200; cmb[271]=4356618; cmb[272]=5702887; cmb[273]=6534927; cmb[274]=6656320; cmb[275]=6674031; cmb[276]=6676615; cmb[277]=6676992; cmb[278]=6677047; cmb[279]=6677055; cmb[280]=6677056; cmb[281]=6677057; cmb[282]=6677060; cmb[283]=6677081; cmb[284]=6677225; cmb[285]=6678212; cmb[286]=6684977; cmb[287]=6731345; cmb[288]=7049156; cmb[289]=9227465; cmb[290]=10573734; cmb[291]=10770152; cmb[292]=10798809; cmb[293]=10802990; cmb[294]=10803600; cmb[295]=10803689; cmb[296]=10803702; cmb[297]=10803704; cmb[298]=10803705; cmb[299]=10803710; cmb[300]=10803744; cmb[301]=10803977; cmb[302]=10805574; cmb[303]=10816520; cmb[304]=10891545; cmb[305]=11405774; cmb[306]=14930352; cmb[307]=17108661; cmb[308]=17426472; cmb[309]=17472840; cmb[310]=17479605; cmb[311]=17480592; cmb[312]=17480736; cmb[313]=17480757; cmb[314]=17480760; cmb[315]=17480761; cmb[316]=17480762; cmb[317]=17480770; cmb[318]=17480825; cmb[319]=17481202; cmb[320]=17483786; cmb[321]=17501497; cmb[322]=17622890; cmb[323]=18454930; cmb[324]=24157817; cmb[325]=27682395; cmb[326]=28196624; cmb[327]=28271649; cmb[328]=28282595; cmb[329]=28284192; cmb[330]=28284425; cmb[331]=28284459; cmb[332]=28284464; cmb[333]=28284465; cmb[334]=28284467; cmb[335]=28284480; cmb[336]=28284569; cmb[337]=28285179; cmb[338]=28289360; cmb[339]=28318017; cmb[340]=28514435; cmb[341]=29860704; cmb[342]=39088169; cmb[343]=44791056; cmb[344]=45623096; cmb[345]=45744489; cmb[346]=45762200; cmb[347]=45764784; cmb[348]=45765161; cmb[349]=45765216; cmb[350]=45765224; cmb[351]=45765225; cmb[352]=45765226; cmb[353]=45765229; cmb[354]=45765250; cmb[355]=45765394; cmb[356]=45766381; cmb[357]=45773146; cmb[358]=45819514; cmb[359]=46137325; cmb[360]=48315634; cmb[361]=63245986; cmb[362]=72473451; cmb[363]=73819720; cmb[364]=74016138; cmb[365]=74044795; cmb[366]=74048976; cmb[367]=74049586; cmb[368]=74049675; cmb[369]=74049688; cmb[370]=74049690; cmb[371]=74049691; cmb[372]=74049696; cmb[373]=74049730; cmb[374]=74049963; cmb[375]=74051560; cmb[376]=74062506; cmb[377]=74137531; cmb[378]=74651760; cmb[379]=78176338; cmb[380]=102334155; cmb[381]=117264507; cmb[382]=119442816; cmb[383]=119760627; cmb[384]=119806995; cmb[385]=119813760; cmb[386]=119814747; cmb[387]=119814891; cmb[388]=119814912; cmb[389]=119814915; cmb[390]=119814916; cmb[391]=119814917; cmb[392]=119814925; cmb[393]=119814980; cmb[394]=119815357; cmb[395]=119817941; cmb[396]=119835652; cmb[397]=119957045; cmb[398]=120789085; cmb[399]=126491972; cmb[400]=165580141; cmb[401]=189737958; cmb[402]=193262536; cmb[403]=193776765; cmb[404]=193851790; cmb[405]=193862736; cmb[406]=193864333; cmb[407]=193864566; cmb[408]=193864600; cmb[409]=193864605; cmb[410]=193864606; cmb[411]=193864608; cmb[412]=193864621; cmb[413]=193864710; cmb[414]=193865320; cmb[415]=193869501; cmb[416]=193898158; cmb[417]=194094576; cmb[418]=195440845; cmb[419]=204668310; cmb[420]=267914296; cmb[421]=307002465; cmb[422]=312705352; cmb[423]=313537392; cmb[424]=313658785; cmb[425]=313676496; cmb[426]=313679080; cmb[427]=313679457; cmb[428]=313679512; cmb[429]=313679520; cmb[430]=313679521; cmb[431]=313679522; cmb[432]=313679525; cmb[433]=313679546; cmb[434]=313679690; cmb[435]=313680677; cmb[436]=313687442; cmb[437]=313733810; cmb[438]=314051621; cmb[439]=316229930; cmb[440]=331160282; cmb[441]=433494437; cmb[442]=496740423; cmb[443]=505967888; cmb[444]=507314157; cmb[445]=507510575; cmb[446]=507539232; cmb[447]=507543413; cmb[448]=507544023; cmb[449]=507544112; cmb[450]=507544125; cmb[451]=507544127; cmb[452]=507544128; cmb[453]=507544133; cmb[454]=507544167; cmb[455]=507544400; cmb[456]=507545997; cmb[457]=507556943; cmb[458]=507631968; cmb[459]=508146197; cmb[460]=511670775; cmb[461]=535828592; cmb[462]=701408733; cmb[463]=803742888; cmb[464]=818673240; cmb[465]=820851549; cmb[466]=821169360; cmb[467]=821215728; cmb[468]=821222493; cmb[469]=821223480; cmb[470]=821223624; cmb[471]=821223645; cmb[472]=821223648; cmb[473]=821223649; cmb[474]=821223650; cmb[475]=821223658; cmb[476]=821223713; cmb[477]=821224090; cmb[478]=821226674; cmb[479]=821244385; cmb[480]=821365778; cmb[481]=822197818; cmb[482]=827900705; cmb[483]=866988874; vector<signed long int> v; int n; signed long int k; cin >> n; for (int i=1;i<=n;++i) { cin >> k; v.push_back(k); } for (int i=0;i<=n-1;++i) { bool fib = false; for (int j=0;j<=483;++j) { if (v[i]==cmb[j]) { fib = true; break; } } if (fib == true) cout << "TAK" << endl; else cout << "NIE" << endl; } } |