結果

問題 No.2187 三立法和 mod 333
ユーザー 👑 p-adicp-adic
提出日時 2022-11-03 00:52:52
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 27,427 bytes
コンパイル時間 573 ms
コンパイル使用メモリ 68,224 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-18 00:02:58
合計ジャッジ時間 1,362 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <stdio.h>
#include <stdint.h>
using namespace std;

using ll = long long;

#define TYPE_OF( VAR ) remove_const<remove_reference<decltype( VAR )>::type >::type
#define UNTIE ios_base::sync_with_stdio( false ); cin.tie( nullptr ) 
#define CIN( LL , A ) LL A; cin >> A 
#define ASSERT( A , MIN , MAX ) assert( MIN <= A && A <= MAX ) 
#define CIN_ASSERT( A , MIN , MAX ) CIN( TYPE_OF( MAX ) , A ); ASSERT( A , MIN , MAX ) 
#define QUIT return 0 
#define RETURN( ANSWER ) cout << ( ANSWER ) << "\n"; QUIT 

#include <cassert>

#define MAIN main

inline constexpr const ll bound_A = 3333;

int MAIN()
{
  UNTIE;
  CIN_ASSERT( A , 1 , bound_A );
  constexpr const ll answer[bound_A] = {1189420,1186602,1193442,1186640,1187109,1190160,1190911,1189416,1186605,1192661,1188582,1192593,1185805,1190334,1188276,1188935,1189770,1191033,1191391,1191816,1185177,1192486,1192959,1193439,1195463,1191699,1192347,1188550,1190424,1188348,1188736,1192974,1185984,1192804,1186305,1194855,1189739,1186974,1191111,1189468,1191876,1188321,1189555,1191732,1186086,1190333,1184886,1191828,1192766,1190283,1190559,1189987,1190268,1186800,1192766,1192911,1192686,1193021,1187694,1188498,1189543,1190799,1192158,1192432,1191627,1193643,1188008,1191906,1189641,1194482,1188312,1190454,1188854,1191282,1191648,1187212,1188981,1185579,1189174,1186299,1189110,1189448,1189104,1189392,1187411,1188819,1194273,1191286,1190781,1190796,1189639,1191624,1193460,1192732,1189653,1187652,1186148,1187397,1194843,1188640,1187967,1191084,1186412,1192182,1190823,1190029,1193739,1192881,1190855,1185300,1191759,1188178,1191735,1185807,1188622,1191639,1190454,1189076,1191567,1193373,1192585,1187049,1191711,1192826,1193205,1188753,1189664,1189659,1188087,1188355,1188903,1188477,1191214,1188258,1194171,1188032,1190694,1190535,1190569,1188663,1191045,1190528,1190895,1190700,1191712,1185921,1192590,1189507,1188768,1190847,1188311,1191354,1186905,1192475,1186758,1194120,1194211,1193556,1189836,1188829,1190559,1190808,1190251,1187568,1190274,1192400,1194525,1188024,1189444,1192395,1191786,1189979,1192410,1193190,1189804,1194051,1187763,1189924,1185672,1188798,1191859,1188423,1190307,1189358,1186806,1192332,1189804,1192620,1189914,1190740,1186485,1191138,1189286,1189965,1194159,1190633,1189653,1185009,1187306,1193418,1188228,1187086,1187499,1189953,1189199,1187952,1192743,1192955,1192920,1192017,1186349,1192191,1189821,1193243,1191861,1190265,1189922,1186644,1192866,1192823,1192776,1191087,1186222,1192302,1190937,1191242,1187973,1189329,1193723,1191813,1187436,1186738,1188906,1193304,1192280,1191300,1191381,1190083,1187721,1186971,1186561,1187574,1190691,1192724,1188846,1191132,1187362,1190148,1190868,1188329,1194063,1190457,1191520,1186671,1193094,1185263,1192599,1190751,1189330,1188852,1186305,1190806,1194816,1189113,1188316,1188939,1191711,1191052,1191078,1190103,1190843,1194249,1187280,1190110,1193463,1192989,1194644,1188084,1191621,1192456,1188807,1191723,1189651,1192353,1186551,1190209,1193736,1191921,1194625,1186332,1188843,1189691,1190982,1192386,1190741,1190241,1190100,1188278,1185084,1187184,1191473,1191567,1191522,1188808,1190040,1192380,1187927,1187673,1190151,1192981,1192911,1187988,1192960,1189395,1192593,1189631,1188765,1188471,1188940,1194069,1195395,1194250,1189242,1187076,1190506,1189212,1193031,1194167,1191396,1195047,1189718,1188243,1187904,1190905,1189581,1189752,1188626,1187910,1194084,1189444,1186122,1186950,1187194,1189905,1193298,1188125,1191198,1190262,1187521,1185174,1192257,1193125,1191468,1190790,1187668,1193649,1190808,1189865,1189002,1192239,1191680,1187469,1187583,1192210,1187028,1187025,1186822,1187790,1188852,1191703,1191693,1190574,1193678,1187349,1191471,1191521,1190100,1192731,1192189,1191234,1191987,1188245,1187334,1191501,1190194,1187934,1191726,1194338,1193613,1191858,1188958,1188285,1191879,1190870,1192896,1193274,1190992,1190979,1188921,1187300,1187427,1192266,1190593,1189722,1187979,1185889,1194072,1188660,1186351,1190934,1191744,1192030,1188864,1191138,1187899,1191618,1186152,1187161,1187031,1190970,1194046,1194828,1191603,1191995,1190088,1189725,1193953,1193031,1193592,1191529,1194030,1189707,1188751,1191075,1191738,1189634,1188510,1192263,1187176,1193790,1189407,1185985,1186950,1185447,1188212,1189134,1191372,1192585,1187589,1191927,1186934,1192383,1191660,1190861,1189719,1189143,1191059,1190346,1191576,1194113,1192170,1191186,1188391,1186956,1194069,1189655,1187889,1188522,1190653,1192560,1187625,1188779,1190001,1194009,1188377,1192311,1190784,1187704,1189437,1190727,1189597,1186008,1193205,1188149,1189668,1189896,1187125,1192953,1194870,1189123,1188990,1190295,1188293,1187547,1191732,1190713,1193268,1193445,1192472,1191915,1189071,1191839,1193616,1188564,1186403,1187121,1187598,1193279,1187145,1186632,1187683,1189734,1187679,1186786,1193178,1192833,1193701,1185033,1188600,1187770,1190763,1192455,1189721,1189521,1191003,1186049,1192416,1193034,1191143,1191267,1191300,1191262,1192251,1191207,1190077,1189173,1191885,1191413,1193313,1187520,1192051,1190565,1188543,1190164,1189797,1190514,1189777,1189536,1188810,1186379,1192296,1189665,1191962,1188288,1191861,1191418,1190298,1191978,1187146,1193052,1192236,1192537,1188363,1186986,1188952,1193208,1190529,1191457,1190904,1192005,1192283,1190367,1189158,1190900,1195008,1190940,1188950,1189422,1190019,1192745,1187958,1190328,1187714,1192605,1191882,1190044,1187502,1189287,1188334,1190709,1191012,1192966,1188405,1188585,1187921,1193700,1191690,1192943,1188147,1188972,1190692,1186626,1187697,1191013,1190598,1187499,1188694,1187187,1191312,1192616,1190496,1188549,1192568,1190439,1188438,1193183,1191381,1194240,1185697,1188363,1192452,1188286,1189950,1194501,1192667,1187592,1186782,1190665,1191516,1193085,1185793,1189485,1191984,1191290,1188864,1188333,1189067,1190190,1192995,1192850,1188279,1190139,1193111,1189578,1189590,1189570,1190637,1194969,1186937,1187964,1188543,1192342,1192002,1191654,1190839,1189155,1189761,1187197,1191915,1188471,1192724,1190262,1194312,1186780,1190946,1190376,1191260,1188609,1187634,1188089,1188726,1192737,1191961,1188666,1193580,1191365,1189881,1189374,1191364,1190265,1193406,1191335,1190928,1190097,1188532,1193943,1191618,1190932,1190850,1188591,1192639,1192230,1193553,1188038,1187004,1185906,1191533,1189218,1189296,1189901,1191189,1190253,1190074,1186005,1191474,1192337,1186731,1187040,1186775,1191081,1191501,1188089,1190700,1191330,1192996,1189749,1194375,1190258,1192518,1192842,1190195,1190454,1188750,1192691,1194270,1192341,1189085,1188057,1192035,1187683,1189491,1190379,1188946,1193328,1192617,1188682,1189449,1191993,1189694,1192830,1190097,1192100,1190724,1189908,1187096,1186347,1187013,1189189,1193376,1187436,1190396,1191261,1192788,1189196,1190892,1192257,1190344,1187679,1187136,1192528,1189053,1192782,1187771,1188321,1189722,1190509,1188471,1195095,1189822,1186710,1188156,1187833,1189911,1192917,1186291,1189941,1189665,1188949,1190490,1191354,1188851,1192101,1193676,1192253,1194516,1193172,1190216,1190970,1189758,1187561,1192632,1195764,1192562,1190343,1186689,1188128,1187160,1189137,1189192,1191639,1190166,1191454,1191333,1187748,1187086,1191000,1193304,1188187,1189026,1190253,1192483,1188261,1185600,1186444,1189788,1191978,1188298,1192422,1193010,1191277,1191729,1188222,1187435,1194342,1193844,1194139,1190799,1189308,1190363,1190082,1190421,1188764,1192272,1192395,1192141,1193013,1189944,1190383,1192146,1186659,1193009,1188678,1189953,1191737,1190106,1188054,1188008,1187736,1188636,1192864,1188765,1187790,1189832,1188897,1188471,1192453,1188699,1192929,1188310,1190163,1193238,1192951,1189698,1191027,1188650,1189377,1187808,1187603,1194045,1188465,1185745,1187007,1187955,1187452,1189401,1190499,1190650,1193271,1191702,1190758,1189359,1187640,1191310,1194036,1191225,1190672,1193400,1189647,1190410,1185885,1189950,1193174,1196058,1194288,1187950,1187133,1189515,1191277,1192437,1192548,1192522,1188174,1192692,1192894,1188465,1189890,1188308,1189113,1189227,1188350,1187544,1190877,1190941,1185975,1185303,1190218,1189434,1192470,1188773,1191117,1192134,1184708,1187664,1187856,1193077,1193682,1195476,1190240,1188534,1189134,1189186,1193628,1192587,1188448,1190331,1191912,1193267,1190025,1192323,1191494,1190466,1190565,1191727,1187454,1189650,1192321,1188090,1189146,1185539,1187907,1192128,1190434,1189263,1188297,1192060,1193451,1193241,1187794,1192533,1188036,1191028,1189842,1190661,1187707,1192518,1193151,1186573,1190868,1187907,1192064,1189368,1189011,1187146,1190970,1190718,1190419,1188087,1191102,1192141,1190826,1190193,1189085,1187841,1189191,1190330,1190631,1187724,1192844,1192608,1191297,1186574,1190760,1192527,1193182,1190121,1190523,1190315,1187544,1188042,1193431,1189833,1192104,1187261,1193133,1193712,1193210,1191420,1191207,1191548,1186251,1188072,1187249,1192404,1192068,1185853,1184991,1188513,1188025,1191294,1192035,1192960,1191630,1187580,1190096,1188858,1190454,1190825,1189995,1189938,1188689,1187760,1191507,1188997,1190586,1188879,1189894,1190319,1193439,1191217,1189485,1190490,1190770,1192320,1191696,1188919,1190895,1194036,1189024,1190658,1189830,1190905,1190061,1187787,1187542,1191372,1193472,1192895,1194459,1187463,1191328,1188915,1189785,1188961,1189716,1192863,1185928,1191678,1185921,1191808,1188225,1191153,1191938,1191666,1191165,1188364,1191786,1192707,1186246,1192476,1190502,1190890,1188282,1187802,1190009,1189110,1192440,1190872,1192275,1193565,1192426,1191246,1186314,1191674,1190991,1188882,1189175,1191708,1189980,1188664,1185792,1191594,1187473,1192827,1185894,1188458,1190331,1192128,1187425,1190937,1193091,1185718,1189008,1189446,1190911,1194276,1189848,1190150,1189356,1190853,1189580,1192119,1192413,1191665,1190571,1188273,1192292,1192812,1189557,1190107,1190841,1187952,1192522,1189566,1188093,1187434,1185234,1189695,1188055,1191012,1190274,1190441,1190787,1186785,1195507,1190550,1190997,1188124,1193535,1192878,1189454,1191825,1189080,1193596,1187880,1186677,1192562,1192992,1193631,1191643,1185798,1188966,1188763,1188327,1192305,1192997,1192566,1187400,1190381,1186638,1192329,1190173,1192689,1190376,1187585,1188021,1187682,1189051,1192263,1187088,1193440,1186938,1193346,1189930,1190511,1188231,1191905,1193814,1191231,1193543,1192944,1195059,1192216,1188321,1190790,1189811,1193265,1192212,1187186,1188000,1187655,1185232,1191852,1187754,1188643,1189740,1190193,1191961,1190919,1188825,1186993,1192209,1187718,1187192,1190691,1187868,1189918,1190187,1188609,1190267,1191450,1192374,1191791,1192857,1191414,1194136,1190295,1189998,1191449,1192425,1193055,1187488,1187571,1191420,1189094,1189452,1186728,1186774,1189818,1190772,1193218,1189443,1191066,1191805,1187940,1196358,1188292,1193325,1188003,1189603,1189809,1189737,1187080,1188615,1193247,1187392,1187370,1191561,1191428,1194057,1190001,1189768,1191213,1186818,1190837,1191018,1191906,1188022,1188798,1187052,1187239,1190052,1190745,1193104,1189938,1189332,1187345,1187610,1187058,1192916,1187325,1189437,1189744,1191138,1189374,1190533,1189146,1190022,1193564,1191669,1195719,1193357,1192101,1191870,1189682,1188708,1192842,1194010,1193358,1188408,1187219,1187532,1188636,1190267,1192086,1188516,1187596,1192308,1193199,1192403,1190304,1186107,1193050,1191156,1190862,1188928,1190601,1190022,1184354,1183461,1187799,1189859,1194627,1191633,1193647,1188363,1190079,1190648,1188402,1193805,1191214,1192818,1188933,1187131,1190100,1188612,1187857,1190847,1192656,1191278,1190733,1192350,1192235,1192311,1192101,1186522,1192392,1187946,1189141,1190166,1192464,1188569,1191555,1188627,1188700,1191744,1188693,1187191,1193271,1188507,1190947,1192662,1188237,1192198,1187454,1192668,1189579,1194306,1186623,1187140,1190622,1188999,1191326,1187490,1188042,1189486,1188423,1188342,1186025,1187184,1193040,1189981,1189161,1190127,1191964,1190085,1186413,1187296,1187262,1194960,1191274,1192626,1191333,1188982,1191195,1185888,1193098,1192620,1191507,1192484,1188462,1189935,1190405,1192266,1189668,1190639,1192824,1185711,1192025,1193796,1193925,1190048,1187892,1191294,1187582,1190604,1187940,1191640,1193613,1187358,1185101,1187142,1188822,1193984,1186824,1190559,1187867,1187688,1188045,1190452,1193865,1189779,1190740,1188972,1189128,1193807,1189395,1191807,1190563,1188438,1189476,1187864,1193385,1191651,1193428,1191612,1187481,1189303,1190997,1189200,1188242,1192962,1192308,1190566,1190001,1188138,1189672,1192434,1189758,1192039,1192392,1194438,1192321,1185741,1190991,1187981,1191915,1187589,1193206,1190274,1189962,1191049,1186728,1193568,1189018,1190529,1191153,1189145,1190370,1190136,1190758,1188984,1187523,1190998,1187673,1193103,1189969,1187049,1186746,1185911,1192788,1190091,1188043,1192890,1192944,1189763,1186929,1193088,1192772,1191111,1188189,1185404,1192137,1190361,1187707,1192134,1186245,1190402,1187232,1192131,1194068,1195476,1193793,1190746,1189653,1187430,1188130,1192626,1188393,1192450,1190565,1186605,1186223,1187424,1190685,1188676,1192896,1191165,1191916,1191147,1191045,1192103,1188816,1186464,1187372,1189185,1191879,1191638,1189161,1185381,1185791,1188414,1185723,1194157,1192698,1190412,1188982,1190748,1193154,1190086,1192638,1186479,1192738,1194000,1192401,1192609,1190427,1190970,1189480,1187133,1192107,1192799,1195650,1192224,1185065,1191171,1188585,1192028,1189806,1190559,1191038,1186146,1187691,1186268,1192098,1190928,1191388,1192458,1193082,1191503,1191270,1188039,1191925,1187619,1191912,1186852,1194051,1186647,1187470,1191588,1190379,1189657,1190763,1193190,1193332,1194501,1191858,1186661,1192143,1190712,1186774,1190391,1188435,1189630,1188900,1189203,1192135,1188120,1188522,1185094,1188102,1190187,1190758,1190871,1186914,1192853,1191507,1191573,1193011,1186914,1194306,1191491,1188876,1190445,1190294,1191915,1190721,1191386,1190250,1193316,1191331,1193286,1191648,1187744,1191327,1188603,1187569,1192833,1188021,1186736,1186863,1185009,1189057,1187007,1189644,1189571,1190163,1190355,1186886,1194840,1187127,1192387,1187046,1193406,1193924,1192881,1191162,1190498,1193100,1187091,1186214,1193901,1190808,1194016,1191207,1187490,1188691,1188036,1190601,1189862,1194687,1187913,1185998,1189161,1187607,1194154,1191270,1186569,1189975,1190043,1187952,1186348,1187622,1193208,1188314,1192956,1184550,1192549,1189416,1190070,1190437,1190430,1193661,1190138,1195071,1190757,1192360,1192614,1189224,1193368,1190604,1189317,1191907,1188285,1190520,1188962,1188285,1188588,1188688,1186653,1188717,1190293,1189860,1193310,1189294,1185954,1191960,1190297,1191654,1189995,1187929,1192200,1188633,1190636,1189374,1191912,1194916,1189986,1191219,1186601,1195626,1192254,1190159,1191912,1189878,1190342,1187643,1189770,1193881,1187802,1186074,1187252,1189509,1189383,1189532,1189677,1189887,1192367,1192935,1187391,1193443,1187175,1193502,1188013,1190538,1189719,1190410,1188102,1188189,1188458,1190721,1188804,1194454,1190499,1193349,1188301,1190145,1189677,1188235,1191792,1188114,1193482,1186818,1187169,1186198,1189311,1192701,1189519,1188882,1191036,1188932,1189920,1187070,1187525,1192641,1187616,1187945,1186359,1189977,1191134,1189908,1187979,1186333,1193952,1190865,1194583,1193394,1189827,1189939,1189119,1190862,1192744,1192251,1188579,1186861,1190208,1191591,1190006,1186992,1188312,1190477,1189743,1191006,1192945,1194297,1192854,1186708,1191222,1189437,1191871,1193580,1190625,1188947,1188723,1185030,1186918,1188171,1193115,1187629,1193883,1186344,1192204,1189950,1188705,1192885,1190424,1186059,1186501,1189011,1194039,1189042,1188609,1187346,1192193,1191843,1187478,1192330,1192491,1192719,1191130,1187496,1190619,1187747,1191435,1189365,1190134,1192830,1192050,1192759,1189689,1188036,1191721,1188204,1193697,1187204,1191753,1189548,1186805,1192467,1190445,1193959,1187982,1193553,1186775,1188396,1188033,1188437,1190187,1190973,1188377,1190379,1191798,1191116,1188918,1186821,1189672,1192590,1188747,1190882,1192650,1189008,1187303,1188480,1186041,1192249,1190214,1190751,1189819,1190685,1189140,1187299,1193151,1190781,1188110,1190061,1186623,1190912,1192113,1194090,1191742,1190541,1191324,1185571,1189710,1192872,1194970,1194390,1187010,1188692,1192764,1190583,1191913,1188528,1192932,1192471,1187457,1187340,1187143,1194084,1185357,1188439,1189080,1187343,1189117,1192191,1190853,1187269,1187799,1187694,1188491,1194057,1188867,1192637,1189650,1187238,1188668,1186626,1190976,1192412,1193025,1189251,1189745,1188183,1190508,1189465,1186836,1192461,1194022,1193292,1192557,1189724,1190094,1192047,1190251,1191216,1190613,1193989,1191399,1186872,1189502,1189140,1193298,1186799,1192011,1187688,1190093,1191795,1188897,1193564,1191393,1186875,1191199,1193820,1190622,1191364,1190376,1189830,1191101,1190811,1186521,1192829,1188624,1187457,1190293,1186830,1188390,1189477,1187838,1188075,1192571,1191807,1190955,1192895,1190412,1184637,1187693,1187415,1193007,1188736,1190796,1191099,1187681,1187478,1188783,1190329,1191507,1196238,1194463,1190358,1191363,1191917,1190391,1191624,1187810,1192275,1191996,1190557,1187493,1188120,1191833,1190394,1188624,1188949,1193769,1193049,1192759,1189689,1185132,1184867,1187280,1191252,1191079,1191150,1187823,1186570,1189263,1187943,1185658,1189812,1192233,1190756,1189206,1189875,1189796,1189005,1192962,1187902,1191387,1193502,1194070,1193778,1191528,1187249,1189608,1190094,1192301,1192317,1191153,1190651,1188741,1188477,1188889,1192173,1188048,1191493,1190991,1186206,1187281,1191630,1192968,1191311,1186287,1193319,1194202,1194093,1189242,1190363,1191786,1187511,1189969,1184265,1192002,1188830,1188249,1192329,1188503,1190499,1189470,1192762,1191753,1189101,1190773,1190301,1191795,1189720,1184535,1188114,1188388,1192092,1191189,1188811,1187178,1187001,1186978,1189740,1187400,1187842,1190619,1189587,1189082,1192146,1191816,1194067,1193634,1187052,1192364,1193346,1193145,1189165,1191096,1190289,1189870,1190739,1186797,1195940,1192062,1192407,1192195,1186290,1186779,1189066,1191069,1193658,1188032,1186410,1186842,1187419,1189713,1186311,1187386,1191102,1191195,1190387,1187211,1192746,1188284,1193277,1186827,1190560,1194237,1191852,1193113,1189926,1189188,1190627,1187832,1192668,1188073,1191888,1186764,1188688,1187874,1190934,1190806,1190697,1193406,1188397,1189353,1187373,1191643,1192164,1192422,1186895,1190367,1187655,1190590,1188711,1188045,1189760,1191177,1189932,1185338,1192230,1190745,1190368,1189983,1190211,1191667,1189275,1192017,1190249,1191171,1189482,1190539,1193118,1188816,1190276,1190763,1187577,1189879,1193022,1192029,1187674,1188936,1186512,1191211,1189644,1189854,1189207,1190814,1185162,1188178,1192023,1192179,1194121,1186356,1189410,1193822,1190253,1191057,1190368,1193958,1186284,1190482,1186953,1194495,1191977,1190091,1188240,1191202,1189308,1188033,1189807,1192665,1188408,1188800,1189134,1189347,1189613,1190493,1190712,1189342,1191948,1191327,1191382,1189101,1188030,1193113,1187748,1186926,1191190,1190241,1188939,1190014,1188519,1192179,1191514,1191861,1186539,1192244,1186167,1191714,1191275,1191234,1191492,1187903,1190925,1185294,1190173,1187577,1190292,1191605,1192890,1189068,1189148,1191360,1190484,1190930,1187790,1189584,1192190,1187250,1188546,1188311,1189602,1190838,1190141,1187034,1189083,1189354,1191543,1187967,1189790,1189338,1192497,1190968,1191135,1189911,1188862,1190085,1191696,1192201,1194414,1188891,1191356,1188603,1188285,1190869,1190811,1193742,1193105,1188477,1188747,1194475,1192551,1192926,1190632,1189752,1189743,1188067,1188285,1188768,1192165,1186944,1190055,1187149,1190913,1192212,1188787,1188714,1189212,1186160,1189341,1189905,1192135,1189743,1188546,1189993,1194840,1190886,1189423,1189335,1192038,1189663,1189626,1191531,1185674,1188243,1189929,1192039,1189926,1190403,1192676,1192914,1191255,1187056,1192602,1191822,1192460,1187172,1187472,1191092,1190757,1190991,1191398,1192443,1186923,1191515,1187961,1187952,1189286,1192458,1191537,1189598,1186533,1190772,1194286,1192797,1190466,1188674,1189440,1193772,1188266,1189635,1189743,1189090,1187655,1191132,1186405,1188645,1189353,1189112,1186779,1186539,1190464,1190487,1191720,1190089,1184241,1187481,1189952,1193715,1192716,1195417,1188603,1189614,1191622,1188861,1188615,1188761,1193565,1192770,1190927,1189242,1192419,1192108,1190985,1190622,1192087,1193001,1194018,1189214,1188525,1189647,1186370,1185921,1187964,1188677,1189752,1192248,1190606,1186866,1185636,1188712,1192857,1194180,1189523,1192125,1188489,1190377,1189695,1186035,1186970,1190838,1191096,1188674,1190088,1185702,1190534,1189911,1189857,1190294,1194402,1192137,1194386,1190931,1186401,1193767,1193223,1189650,1191991,1188978,1190100,1188299,1187616,1191702,1191716,1187334,1190628,1191472,1192749,1190271,1192501,1191990,1191258,1186786,1191624,1193496,1192669,1192875,1192359,1187158,1190766,1190643,1186801,1192191,1191066,1190395,1190895,1188615,1187039,1188336,1185591,1189747,1189284,1189455,1192444,1190148,1187643,1185125,1186236,1186599,1193494,1191864,1188654,1189702,1187553,1187049,1194077,1188858,1188804,1191451,1194348,1191849,1188083,1191327,1190379,1192715,1186701,1188321,1195121,1195260,1189743,1188713,1188849,1189740,1189709,1190103,1193001,1192771,1191846,1188486,1186642,1184832,1187952,1192870,1189587,1190940,1189852,1186950,1187844,1189621,1187727,1187340,1190920,1189215,1188117,1192556,1190856,1189956,1192223,1188192,1188282,1191761,1192563,1193208,1192252,1186995,1190544,1189724,1188429,1190724,1191211,1186863,1192119,1188119,1192509,1191417,1189705,1186491,1190199,1191376,1187505,1192482,1188310,1193127,1187676,1191800,1193244,1193709,1192792,1190154,1189992,1191010,1189098,1188894,1189552,1189422,1191483,1194395,1191963,1186116,1189940,1190586,1190538,1190489,1189083,1193574,1189336,1186437,1185108,1188226,1191969,1189395,1191883,1191024,1187973,1191421,1186584,1191840,1187038,1186830,1187349,1189999,1187943,1190559,1193635,1194000,1192824,1187569,1189455,1194081,1192883,1192419,1191021,1191463,1190646,1190283,1188052,1191984,1191990,1192243,1187064,1187652,1188739,1191798,1189839,1188748,1189092,1186995,1192457,1191219,1190316,1190503,1186032,1189647,1189520,1190247,1190328,1188730,1188642,1190646,1189970,1188096,1190760,1190671,1192374,1191942,1190371,1188888,1190427,1191319,1185900,1187043,1186087,1194051,1189002,1192331,1189194,1190280,1190018,1187706,1189539,1191200,1193658,1190742,1192777,1185387,1188597,1189033,1190292,1188588,1189234,1190247,1193259,1189183,1188912,1187241,1191022,1192521,1191285,1190236,1190679,1189767,1191277,1184961,1187868,1188887,1194240,1192038,1187422,1188708,1191417,1193393,1191030,1192296,1193867,1186956,1191675,1188349,1191951,1189023,1187536,1189911,1187652,1189042,1188633,1192875,1191875,1190646,1189842,1189447,1192947,1194237,1190348,1192023,1191690,1187542,1186926,1187187,1192168,1190784,1189410,1187204,1190148,1188384,1191815,1191558,1191810,1189555,1190883,1192758,1194214,1190160,1192476,1187992,1189671,1190793,1191439,1192128,1185168,1190311,1190760,1191411,1186078,1188291,1187874,1189250,1189500,1187676,1193537,1194954,1189749,1187182,1186032,1186863,1193420,1189704,1191342,1189370,1188546,1189497,1190128,1192725,1188702,1195069,1190550,1190493,1191014,1190352,1189749,1191178,1192047,1191207,1186907,1192767,1186572,1190062,1187151,1191567,1190704,1189170,1187325,1188628,1189011,1187598,1187215,1186404,1188156,1194016,1188432,1191873,1190839,1188246,1190274,1191908,1192278,1194402,1187696,1189749,1191078,1193903,1191057,1189635,1190738,1192353,1192782,1187341,1192590,1190388,1192750,1191513,1186374,1191178,1191495,1189215,1188829,1186608,1187754,1188389,1190043,1189701,1190836,1188309,1190187,1190341,1185825,1189683,1192391,1189098,1191567,1193164,1189791,1194873,1191601,1188930,1189698,1191266,1188600,1188048,1193359,1184535,1190574,1189369,1192773,1187211,1191608,1190877,1192869,1191598,1187130,1192866,1193534,1186971,1187775,1185730,1189926,1189632,1191712,1192176,1191390,1189963,1188348,1190886,1193809,1189503,1193559,1187254,1190826,1190532,1190509,1193952,1193193,1194302,1190808,1186356,1194605,1188117,1193187,1190863,1189653,1189161,1191832,1190865,1185012,1188515,1185636,1187730,1186759,1189173,1189980,1188205,1188522,1186221,1189541,1190949,1192233,1192468,1194609,1191708,1192645,1190586,1191300,1188824,1187703,1186896,1191562,1192437,1187067,1193615,1191696,1189077,1189114,1190298,1192995,1194697,1192668,1189533,1187434,1188282,1186023,1191049,1185873,1190736,1191385,1188873,1188048,1191163,1191609,1192404,1188071,1189710,1193622,1192948,1187871,1189938,1189307,1186203,1188816,1188103,1187031,1193262,1186525,1192554,1187619,1190324,1190715,1191021,1191602,1191171,1192128,1189127,1191267,1192395,1186219,1191135,1190157,1189948,1192410,1187676,1191670,1189083,1189512,1186634,1190403,1194546,1193672,1191459,1189377,1191502,1186794,1190334,1192121,1191393,1193559,1193828,1187886,1192449,1191958,1190958,1189455,1191350,1192197,1193103,1192717,1184712,1188501,1185163,1186923,1189812,1189955,1193421,1189155,1186418,1186176,1187286,1193210,1192467,1190994,1189147,1189425,1191285,1187552,1194567,1190115,1187359,1187838,1189866,1193326,1188699,1189188,1191260,1188267,1189407,1188478,1191786,1196139,1193032,1191012,1188420,1192276,1188096,1189434,1190848,1192677,1190982,1186174,1189326,1189089,1192388,1193463,1186674,1192016,1187868,1192182,1191128,1189236,1191789,1186834,1187934,1187619,1189288,1192998,1188828,1190518,1190598,1191066,1187729,1187490,1189167,1190687,1192302,1187577,1190267,1192881,1189188,1190819,1187976,1187310,1195183,1188273,1192980,1187174,1190724,1185534,1192951,1188894,1190277,1192571,1187814,1190577,1189111,1190838,1191012,1192922,1191255,1192365,1191377,1189161,1189689,1190509,1186026,1191876,1194167,1193070,1192278,1187938,1190733,1191645,1189294,1187475,1188336,1194095,1187454,1186938,1189084,1188009,1193697,1190173,1192407,1188222,1187137,1191189,1190598,1193512,1187181,1186800,1185565,1186455,1192248,1190509,1189788,1191744,1192124,1191474,1187400,1193086,1194555,1191771,1192729,1186614,1191159,1190554,1189491,1191522,1189133,1189686,1187955,1190867,1189308,1193637,1191196,1190493,1190478,1189274,1192167,1193238,1192094,1192959,1187277,1189094,1187688,1189890,1190107,1189971,1189551,1189970,1192938,1187163,1188070,1187697,1191078,1190291,1190778,1191126,1191161,1190067,1186122,1185191,1187100,1193544,1189543,1193541,1187952,1193095,1189188,1191795,1191149,1189926,1193367,1186115,1190661,1191972,1188064,1187022,1189323,1190924,1189164,1188570,1193893,1189602,1193910,1187518,1191444,1193277,1191124,1192710,1189905,1190506,1190061,1186638,1188253,1188348,1193400,1188172,1188726,1193229,1192453,1190934,1188096,1191296,1193442,1190286,1192838,1191372,1193499,1189384,1188123,1186326,1189786,1189788,1187643,1192840,1188279,1190106,1191203,1186617,1192218,1192648,1192632,1191024,1189064,1188825,1186959,1192271,1186851,1188135,1188608,1187139,1193370,1192912,1191189,1190097,1189003,1190613,1194468,1193467,1194012,1191081,1194329,1189377,1188723,1190317,1190136,1193331,1186138,1191303,1187967,1193416,1186365,1187709,1187554,1186731,1189737,1190951,1191258,1194171,1186849,1188087,1185513,1189081,1193163,1190733,1191227,1189869,1190697,1187155,1189818,1195131,1192267,1193379,1187490,1190576,1192686,1188159,1190987,1188207,1193349,1191496,1187688,1192872,1187695,1194642,1187058,1190780,1191525,1190334,1191166,1186743,1189350,1186423,1187442,1187418,1189682,1193235,1186638,1191095,1191150,1191315,1191976,1190382,1188198,1192715,1191606,1193271,1191667,1193409,1191642,1189397,1189074,1191621,1194157,1188771,1192791};
  RETURN( answer[A % bound_A] );
}
0