[TopCoder8600]MagicFingerprint

题目大意:
  定义magic(x)为将x按十进制顺序写下来,依次对相邻两个数写下差的绝对值,并去除前导0得到的新数。
  若对得到的magic(x)重复进行多次magic,最后会变成一个一位数。
  若最后变成的数是7,则称这个数是幸运数。
  问区间[A,B]内有多少个幸运数。

思路:
  分段打表即可。

 1 #include<algorithm>
 2 const int s[]={0,498,772,955,1021,1078,1135,1202,1384,1658,2045,2283,2557,2624,2663,2689,2706,2717,2745,2841,3089,3208,3361,3544,3586,3627,3653,3673,3701,3732,3839,3861,3915,3982,4048,4079,4120,4145,4171,4184,4196,4208,4226,4291,4333,4390,4421,4460,4490,4503,4512,4521,4534,4564,4603,4634,4691,4733,4798,4816,4828,4840,4853,4879,4904,4945,4976,5042,5109,5163,5186,5292,5323,5351,5371,5397,5438,5481,5664,5817,5935,6183,6279,6307,6318,6335,6361,6400,6467,6741,6979,7485,7718,7782,7794,7806,7823,7848,7914,8066,8453,8640,8793,8820,8833,8840,8844,8846,8852,8968,9319,9557,9831,9898,9937,9963,9980,9991,10019,10115,10363,10390,10543,10568,10610,10626,10635,10643,10645,10649,10666,10682,10736,10768,10778,10795,10836,10852,10871,10880,10886,10893,10911,10938,10950,10960,10973,10994,11024,11034,11040,11045,11058,11078,11093,11098,11105,11109,11130,11143,11155,11163,11176,11190,11203,11207,11210,11211,11213,11226,11239,11276,11307,11319,11330,11335,11337,11340,11344,11350,11364,11494,11590,11610,11618,11625,11628,11628,11632,11688,11710,12005,12238,12247,12256,12262,12266,12267,12272,12364,12637,12714,12758,12823,12839,12851,12857,12861,12867,12884,13015,13253,13347,13414,13435,13444,13451,13456,13459,13475,13573,13692,13845,14028,14070,14111,14137,14157,14185,14216,14323,14336,14378,14445,14461,14492,14508,14521,14531,14538,14544,14552,14565,14630,14646,14660,14677,14716,14736,14744,14748,14754,14764,14794,14815,14828,14838,14850,14877,14895,14902,14910,14923,14949,14965,14974,14979,14982,14985,15004,15020,15056,15078,15106,15122,15131,15135,15139,15142,15146,15154,15180,15230,15258,15264,15276,15281,15283,15285,15292,15300,15399,15493,15557,15562,15571,15578,15581,15587,15603,15682,15687,15708,15735,15760,15769,15778,15781,15784,15789,15792,15911,15930,15962,16001,16017,16029,16036,16042,16049,16062,16089,16242,16267,16309,16325,16334,16342,16344,16348,16365,16387,16441,16508,16574,16605,16646,16671,16697,16710,16722,16726,16739,16766,16808,16818,16849,16870,16888,16895,16898,16902,16910,16930,16969,16986,17000,17016,17081,17094,17102,17108,17118,17132,17157,17173,17186,17196,17206,17248,17270,17279,17295,17307,17327,17343,17352,17356,17362,17366,17398,17404,17421,17441,17452,17461,17470,17477,17479,17481,17487,17491,17501,17510,17522,17529,17541,17546,17553,17559,17562,17565,17569,17590,17606,17623,17630,17639,17644,17646,17647,17677,17685,17695,17716,17742,17751,17759,17764,17769,17773,17892,17936,17960,17976,18017,18033,18044,18050,18055,18071,18084,18126,18193,18209,18240,18256,18269,18279,18286,18292,18304,18322,18387,18429,18486,18517,18556,18586,18599,18608,18611,18618,18636,18657,18688,18698,18740,18767,18780,18784,18790,18799,18818,18834,18875,18892,18902,18934,18988,19004,19018,19028,19046,19062,19088,19104,19116,19124,19145,19172,19175,19181,19191,19197,19214,19230,19245,19248,19250,19260,19262,19263,19273,19278,19290,19299,19312,19324,19328,19329,19330,19334,19346,19359,19368,19380,19385,19395,19396,19398,19408,19410,19413,19428,19444,19461,19467,19477,19483,19486,19513,19534,19542,19554,19570,19596,19612,19630,19640,19654,19670,19724,19756,19766,19783,19824,19840,19859,19868,19874,19878,19891,19918,19960,19970,20001,20022,20040,20047,20050,20059,20072,20102,20141,20172,20229,20271,20336,20354,20366,20372,20379,20389,20402,20418,20449,20465,20532,20574,20587,20603,20608,20614,20625,20641,20682,20698,20722,20767,20885,20889,20894,20899,20907,20916,20942,20963,20973,20981,21011,21012,21014,21019,21028,21035,21052,21068,21089,21093,21096,21099,21105,21112,21117,21129,21136,21148,21157,21167,21171,21177,21179,21181,21188,21197,21206,21217,21237,21254,21260,21292,21296,21302,21306,21315,21331,21351,21363,21379,21388,21410,21452,21462,21472,21485,21501,21526,21540,21550,21556,21564,21577,21642,21658,21672,21689,21728,21748,21756,21760,21763,21770,21788,21809,21840,21850,21892,21919,21932,21936,21948,21961,21987,22012,22053,22084,22150,22217,22271,22293,22310,22314,22316,22324,22333,22349,22391,22417,22569,22596,22609,22616,22622,22629,22641,22657,22696,22728,22748,22866,22869,22874,22877,22880,22889,22898,22923,22950,22971,22977,23055,23072,23077,23080,23087,23096,23102,23165,23259,23359,23366,23373,23375,23377,23382,23394,23400,23428,23478,23504,23512,23516,23519,23523,23527,23536,23552,23580,23602,23638,23654,23673,23676,23679,23684,23693,23709,23735,23748,23756,23763,23781,23808,23820,23830,23843,23864,23894,23904,23910,23914,23922,23942,23981,23998,24012,24028,24093,24106,24114,24120,24127,24137,24150,24166,24197,24213,24280,24322,24336,24442,24473,24501,24521,24547,24588,24631,24814,24967,25085,25183,25199,25202,25207,25214,25223,25244,25312,25405,25643,25775,25791,25797,25801,25807,25819,25835,25900,25945,26021,26294,26387,26391,26392,26396,26402,26411,26420,26653,26948,26970,27026,27030,27030,27033,27040,27048,27068,27164,27295,27308,27314,27318,27321,27323,27328,27339,27351,27382,27419,27432,27445,27447,27448,27451,27455,27468,27482,27495,27503,27515,27528,27549,27553,27560,27565,27580,27600,27613,27618,27624,27634,27664,27685,27698,27708,27720,27747,27765,27772,27778,27787,27806,27822,27863,27880,27890,27922,27976,27992,28009,28013,28015,28023,28032,28048,28090,28116,28268,28295,28543,28639,28667,28678,28695,28721,28760,28827,29101,29339,29690,29807,29812,29814,29818,29825,29838,29866,30018,30205,30994,31579,31607,31608,31610,31614,31617,31627,31721,32227,32331,32623,32661,32661,32662,32666,32673,32683,32733,32981,33000,33017,33045,33047,33047,33050,33058,33076,33098,33205,33214,33223,33225,33225,33225,33227,33232,33251,33264,33276,33283,33296,33308,33312,33315,33318,33325,33343,33353,33362,33367,33380,33400,33415,33420,33427,33431,33452,33465,33477,33483,33493,33507,33532,33548,33561,33571,33581,33623,33645,33661,33666,33672,33683,33699,33740,33756,33780,33825,33943,34041,34057,34060,34065,34072,34081,34102,34170,34263,34501,35007,35240,35304,35316,35328,35345,35370,35436,35588,35975,36129,36173,36185,36187,36188,36188,36188,36188,36275,36601,36839,36933,37000,37021,37030,37037,37042,37045,37061,37159,37174,37218,37228,37244,37250,37266,37272,37273,37276,37277,37279,37294,37304,37311,37324,37333,37338,37344,37354,37358,37360,37364,37376,37380,37385,37390,37398,37402,37407,37409,37409,37412,37416,37419,37422,37424,37428,37436,37442,37442,37442,37443,37443,37445,37447,37447,37447,37449,37455,37461,37463,37464,37465,37465,37467,37467,37469,37470,37486,37491,37563,37566,37566,37567,37568,37569,37569,37607,37703,37807,38104,38178,38178,38178,38179,38180,38181,38182,38766,39268,39455,39608,39635,39648,39655,39659,39661,39667,39783,40134,40372,40646,40713,40752,40778,40795,40806,40834,40930,41178,41205,41358,41383,41425,41441,41450,41458,41460,41464,41481,41497,41551,41583,41593,41610,41651,41667,41686,41695,41701,41708,41726,41753,41765,41775,41788,41809,41839,41849,41855,41860,41873,41893,41908,41913,41920,41924,41945,41958,41970,41978,41991,42005,42018,42022,42025,42026,42028,42041,42054,42091,42122,42134,42145,42150,42152,42155,42159,42165,42179,42309,42405,42425,42433,42440,42443,42443,42447,42503,42525,42820,43053,43062,43071,43077,43081,43082,43087,43179,43452,43473,43517,43528,43544,43548,43550,43550,43550,43551,43562,43800,43894,43961,43982,43991,43998,44003,44006,44022,44120,44129,44173,44183,44199,44205,44208,44210,44211,44212,44214,44227,44269,44336,44352,44383,44399,44412,44422,44429,44435,44437,44450,44461,44477,44483,44500,44506,44526,44530,44531,44537,44542,44545,44555,44568,44575,44587,44599,44604,44608,44612,44616,44620,44623,44629,44634,44637,44640,44652,44656,44662,44663,44665,44666,44668,44672,44676,44678,44682,44688,44694,44694,44694,44694,44695,44698,44700,44702,44707,44714,44722,44724,44724,44724,44724,44726,44728,44730,44746,44774,44777,44792,44819,44827,44836,44840,44842,44843,44845,44848,44967,44986,45018,45057,45073,45085,45092,45098,45105,45118,45145,45171,45196,45205,45221,45229,45232,45232,45233,45234,45240,45259,45272,45274,45278,45287,45290,45295,45298,45300,45300,45307,45334,45343,45353,45361,45382,45392,45394,45395,45399,45407,45427,45466,45483,45497,45513,45578,45591,45599,45603,45610,45624,45632,45648,45656,45660,45669,45711,45717,45723,45739,45745,45748,45750,45759,45762,45766,45768,45800,45806,45821,45825,45829,45831,45839,45846,45847,45849,45855,45859,45864,45865,45865,45865,45867,45870,45877,45883,45884,45886,45889,45901,45917,45920,45927,45930,45933,45934,45934,45964,45972,45982,46003,46029,46038,46046,46051,46056,46060,46075,46119,46129,46145,46151,46167,46173,46174,46177,46178,46191,46206,46206,46215,46218,46227,46240,46245,46252,46255,46256,46264,46276,46279,46280,46283,46291,46300,46303,46305,46307,46311,46329,46339,46342,46349,46354,46366,46379,46381,46383,46385,46391,46407,46413,46430,46435,46467,46478,46494,46508,46518,46536,46552,46578,46594,46606,46614,46635,46662,46665,46670,46675,46681,46684,46700,46708,46710,46710,46719,46721,46721,46731,46731,46734,46739,46752,46760,46762,46762,46762,46765,46774,46784,46793,46795,46800,46804,46805,46806,46816,46818,46821,46836,46852,46869,46875,46885,46891,46894,46921,46936,46941,46951,46967,46974,46990,46995,46998,47002,47008,47015,47028,47038,47042,47046,47050,47069,47076,47081,47085,47092,47095,47097,47099,47100,47102,47112,47119,47121,47122,47128,47135,47139,47140,47141,47143,47154,47160,47162,47166,47171,47181,47191,47193,47194,47196,47196,47199,47206,47209,47212,47216,47227,47229,47233,47236,47260,47278,47297,47301,47304,47309,47315,47324,47331,47352,47361,47368,47395,47396,47398,47403,47412,47419,47436,47452,47473,47477,47480,47482,47484,47488,47490,47494,47501,47503,47512,47518,47521,47527,47529,47531,47538,47547,47556,47567,47587,47604,47610,47619,47622,47626,47628,47634,47650,47656,47668,47674,47679,47681,47696,47706,47713,47726,47735,47740,47746,47756,47760,47762,47766,47769,47772,47778,47781,47782,47786,47790,47794,47797,47801,47805,47805,47806,47807,47807,47809,47815,47817,47821,47826,47831,47833,47834,47835,47835,47838,47841,47847,47852,47853,47855,47862,47864,47865,47865,47867,47867,47868,47877,47882,47886,47893,47897,47899,47900,47911,47923,47948,47951,47956,47957,47958,47967,47972,47977,47989,48010,48015,48026,48027,48027,48028,48030,48034,48039,48042,48136,48151,48158,48165,48167,48169,48174,48186,48192,48220,48270,48296,48301,48304,48305,48306,48308,48316,48332,48336,48358,48370,48376,48395,48397,48399,48402,48411,48415,48420,48426,48434,48436,48441,48444,48454,48464,48472,48474,48477,48482,48485,48487,48491,48492,48493,48494,48498,48500,48503,48504,48506,48512,48517,48520,48522,48522,48523,48523,48523,48523,48528,48533,48538,48539,48541,48542,48543,48543,48544,48546,48552,48565,48575,48578,48582,48584,48585,48585,48585,48587,48587,48591,48593,48596,48600,48602,48604,48604,48607,48610,48640,48751,48762,48763,48763,48764,48766,48769,48778,48834,49129,49151,49207,49211,49211,49214,49221,49229,49249,49345,49476,49481,49483,49484,49485,49487,49490,49496,49508,49514,49551,49564,49575,49576,49576,49578,49582,49595,49601,49608,49612,49614,49618,49630,49634,49639,49644,49652,49656,49661,49663,49663,49666,49666,49666,49668,49675,49681,49683,49687,49687,49693,49695,49695,49695,49695,49696,49696,49699,49699,49700,49717,49718,49719,49719,49719,49719,49719,49719,49725,49728,49787,49824,49827,49831,49832,49833,49833,49833,49888,49900,49918,49957,49962,49963,49966,49968,49968,49968,49974,49979,50534,50794,50795,50795,50796,50797,50799,50803,50897,51122,51226,51518,51556,51556,51557,51561,51568,51578,51628,51876,51877,51878,51879,51879,51879,51881,51884,51889,51911,51923,51929,51935,51935,51935,51935,51937,51940,51959,51965,51968,51970,51977,51989,51992,51994,51996,52003,52013,52018,52019,52019,52023,52024,52028,52031,52038,52041,52052,52053,52055,52059,52061,52062,52062,52062,52063,52067,52070,52070,52070,52076,52079,52080,52081,52081,52081,52081,52084,52086,52090,52188,52198,52199,52201,52202,52202,52202,52241,52255,52319,52593,52772,52775,52777,52777,52778,52779,52779,52913,53243,53322,53339,53360,53363,53365,53365,53365,53365,53369,53483,53563,53657,53675,53696,53704,53706,53708,53708,53711,53723,53842,53886,53910,53926,53967,53983,53994,54000,54005,54021,54027,54069,54078,54082,54090,54106,54114,54128,54135,54139,54142,54147,54168,54171,54175,54178,54193,54200,54206,54208,54209,54214,54224,54231,54233,54235,54238,54250,54257,54259,54260,54262,54265,54268,54270,54270,54270,54272,54281,54287,54289,54290,54291,54294,54297,54297,54298,54300,54312,54330,54334,54336,54338,54340,54342,54343,54343,54346,54350,54393,54456,54471,54471,54471,54472,54473,54473,54502,54834,54978,55165,55318,55345,55358,55365,55369,55371,55377,55493,55844,55963,56018,56050,56058,56061,56062,56063,56064,56068,56172,56199,56352,56377,56419,56435,56444,56452,56454,56458,56475,56491,56502,56534,56539,56556,56562,56578,56584,56586,56588,56592,56597,56609,56621,56628,56641,56651,56654,56659,56665,56667,56672,56676,56684,56689,56694,56698,56710,56714,56716,56717,56721,56721,56726,56730,56733,56733,56735,56746,56751,56752,56753,56754,56755,56758,56760,56763,56765,56771,56776,56783,56786,56787,56787,56789,56791,56791,56795,56816,56838,56886,56968,56968,56968,56968,56969,56970,56974,57066,57213,57290,57334,57399,57415,57427,57433,57437,57443,57460,57591,57829,57923,57990,58011,58020,58027,58032,58035,58051,58149,58268,58421,58604,58646,58687,58713,58733,58761,58792,58899,58912,58954,59021,59037,59068,59084,59097,59107,59114,59120,59128,59141,59206,59222,59236,59253,59292,59312,59320,59324,59330,59340,59370,59391,59404,59414,59426,59453,59471,59478,59486,59499,59525,59541,59550,59555,59558,59561,59580,59596,59632,59654,59682,59698,59707,59711,59715,59718,59722,59730,59756,59806,59834,59840,59852,59857,59859,59861,59868,59876,59975,60069,60133,60138,60147,60154,60157,60163,60179,60258,60263,60284,60296,60301,60306,60315,60316,60317,60322,60325,60444,60455,60487,60493,60509,60513,60515,60516,60516,60519,60546,60699,60724,60766,60782,60791,60799,60801,60805,60822,60828,60840,60872,60876,60893,60899,60901,60903,60905,60906,60910,60923,60950,60992,61002,61033,61054,61072,61079,61082,61083,61087,61107,61113,61130,61136,61152,61163,61176,61178,61182,61192,61198,61203,61212,61225,61232,61242,61257,61259,61268,61274,61276,61279,61281,61287,61291,61295,61299,61308,61313,61322,61323,61325,61326,61328,61331,61333,61334,61340,61343,61347,61347,61347,61347,61348,61350,61357,61363,61365,61368,61370,61391,61395,61398,61400,61409,61411,61412,61412,61439,61446,61455,61476,61483,61492,61498,61503,61506,61510,61629,61673,61697,61713,61754,61770,61781,61787,61792,61808,61815,61857,61875,61891,61899,61915,61925,61928,61932,61934,61936,61942,61963,61966,61970,61974,61989,61996,62002,62003,62004,62006,62016,62037,62045,62055,62064,62091,62098,62098,62104,62113,62132,62148,62189,62206,62216,62248,62302,62318,62322,62325,62330,62346,62353,62369,62379,62384,62399,62426,62429,62433,62443,62446,62449,62451,62466,62468,62470,62478,62479,62480,62484,62485,62487,62489,62499,62511,62515,62516,62516,62518,62526,62539,62544,62547,62547,62557,62557,62559,62568,62568,62570,62578,62594,62597,62603,62608,62613,62616,62643,62664,62672,62684,62700,62726,62742,62760,62770,62784,62800,62811,62843,62848,62865,62871,62887,62893,62895,62897,62899,62912,62924,62929,62936,62939,62949,62967,62971,62973,62975,62978,62987,62995,62998,62999,63002,63014,63022,63023,63026,63033,63038,63051,63060,63063,63072,63072,63087,63100,63101,63104,63105,63111,63127,63133,63149,63159,63203,63218,63222,63227,63232,63240,63249,63275,63296,63306,63314,63344,63344,63345,63348,63351,63358,63361,63377,63389,63392,63394,63396,63400,63405,63408,63420,63422,63422,63428,63438,63442,63447,63448,63448,63451,63459,63468,63470,63490,63505,63511,63543,63547,63553,63557,63566,63582,63602,63614,63630,63639,63645,63687,63696,63700,63708,63724,63732,63746,63753,63757,63765,63770,63778,63781,63795,63799,63800,63807,63815,63817,63819,63826,63836,63838,63839,63841,63843,63846,63853,63857,63861,63863,63869,63872,63875,63876,63876,63879,63885,63891,63893,63894,63895,63903,63911,63913,63915,63917,63918,63920,63924,63928,63931,63932,63944,63946,63947,63960,63980,64016,64019,64021,64022,64024,64028,64037,64045,64072,64087,64090,64102,64103,64103,64105,64111,64120,64120,64122,64146,64246,64251,64254,64254,64254,64257,64261,64267,64272,64322,64343,64351,64355,64358,64362,64366,64375,64391,64419,64441,64477,64493,64505,64507,64509,64511,64517,64533,64536,64549,64553,64557,64562,64574,64586,64593,64606,64616,64619,64624,64630,64634,64638,64642,64643,64646,64652,64655,64658,64662,64664,64666,64673,64678,64683,64684,64685,64685,64686,64686,64691,64694,64697,64699,64701,64704,64705,64706,64707,64707,64714,64719,64723,64724,64729,64735,64737,64737,64738,64740,64740,64751,64751,64752,64754,64760,64764,64767,64770,64774,64795,64806,64810,64811,64811,64813,64815,64824,64830,64836,64957,64960,64975,64975,64975,64977,64979,64985,65005,65019,65150,65163,65169,65173,65176,65178,65183,65194,65206,65237,65274,65281,65289,65289,65289,65290,65292,65302,65316,65320,65328,65331,65336,65357,65360,65364,65367,65382,65389,65395,65397,65400,65405,65408,65410,65418,65428,65438,65441,65446,65448,65454,65461,65464,65464,65465,65466,65467,65470,65470,65471,65482,65486,65487,65490,65491,65491,65491,65492,65493,65494,65500,65507,65513,65515,65517,65518,65519,65519,65522,65529,65535,65549,65551,65553,65556,65558,65560,65561,65562,65566,65739,65742,65742,65743,65744,65747,65748,65758,65782,65877,65884,66050,66050,66050,66051,66052,66054,66059,66109,66192,66211,66228,66256,66258,66258,66261,66269,66287,66309,66416,66422,66425,66425,66425,66425,66427,66429,66435,66448,66451,66455,66468,66476,66477,66479,66481,66484,66502,66507,66509,66511,66516,66520,66528,66533,66538,66542,66554,66558,66560,66564,66568,66568,66569,66570,66572,66579,66582,66582,66582,66598,66603,66604,66605,66605,66605,66606,66608,66608,66610,66652,66668,66669,66672,66674,66674,66674,66675,66678,66682,66773,66853,66878,66879,66881,66882,66883,66883,66890,66959,66960,66964,66976,66981,66981,66983,66983,66983,66983,66984,66995,67024,67024,67034,67043,67049,67052,67053,67057,67062,67077,67121,67131,67147,67153,67169,67175,67176,67179,67180,67202,67244,67254,67264,67277,67293,67318,67332,67342,67348,67349,67362,67374,67376,67377,67379,67387,67407,67408,67413,67415,67420,67438,67441,67443,67445,67446,67454,67467,67471,67474,67478,67484,67489,67491,67491,67491,67491,67497,67506,67509,67510,67512,67519,67522,67522,67524,67525,67528,67533,67533,67533,67537,67539,67539,67540,67540,67540,67540,67547,67548,67550,67551,67551,67554,67555,67556,67556,67559,67561,67748,67774,67801,67811,67813,67814,67814,67815,67826,67943,67980,67985,67998,68013,68014,68016,68018,68019,68022,68035,68062,68088,68113,68122,68138,68146,68149,68149,68150,68151,68167,68221,68253,68263,68280,68321,68337,68356,68365,68371,68378,68383,68410,68420,68423,68431,68452,68459,68469,68472,68474,68480,68487,68502,68505,68509,68512,68533,68538,68541,68545,68551,68557,68567,68571,68573,68573,68574,68587,68594,68595,68597,68598,68600,68601,68603,68606,68608,68614,68627,68630,68630,68631,68632,68634,68637,68637,68637,68647,68666,68670,68672,68672,68672,68672,68674,68674,68678,68685,68698,68719,68763,68774,68790,68794,68796,68796,68796,68797,68808,69046,69140,69207,69228,69237,69244,69249,69252,69268,69366,69375,69419,69429,69445,69451,69454,69456,69457,69458,69460,69473,69515,69582,69598,69629,69645,69658,69668,69675,69681,69683,69696,69707,69723,69729,69746,69752,69772,69776,69777,69783,69788,69791,69801,69814,69821,69833,69845,69850,69854,69858,69862,69866,69869,69875,69880,69883,69886,69898,69902,69908,69909,69911,69912,69914,69918,69922,69924,69928,69934,69940,69940,69940,69940,69941,69944,69946,69948,69953,69960,69968,69970,69970,69970,69970,69972,69974,69976,69992,70020,70025,70046,70073,70098,70107,70116,70119,70122,70127,70130,70249,70268,70300,70339,70355,70367,70374,70380,70387,70400,70427,70580,70605,70647,70663,70672,70680,70682,70686,70703,70725,70779,70846,70912,70943,70984,71009,71035,71048,71060,71064,71077,71104,71146,71156,71187,71208,71226,71233,71236,71240,71248,71268,71307,71324,71338,71354,71419,71432,71440,71446,71456,71470,71495,71511,71524,71534,71544,71586,71608,71617,71633,71645,71665,71681,71690,71694,71700,71704,71736,71742,71759,71779,71790,71799,71808,71815,71817,71819,71825,71829,71839,71848,71860,71867,71879,71884,71891,71897,71900,71902,71906,71918,71921,71921,71924,71927,71932,71933,71934,71964,71970,71980,71990,71993,71998,72006,72009,72013,72017,72032,72076,72086,72102,72108,72124,72130,72131,72134,72135,72148,72190,72257,72273,72304,72320,72333,72343,72350,72356,72356,72358,72370,72386,72388,72405,72413,72417,72419,72420,72423,72430,72448,72469,72500,72510,72552,72579,72592,72596,72598,72600,72606,72622,72628,72645,72650,72682,72693,72709,72721,72730,72748,72755,72758,72767,72779,72787,72808,72818,72821,72827,72832,72837,72837,72839,72847,72850,72850,72860,72862,72862,72866,72867,72869,72870,72875,72883,72887,72887,72888,72892,72904,72914,72916,72918,72919,72923,72924,72925,72933,72935,72937,72952,72954,72957,72960,72970,72974,72977,73004,73019,73024,73034,73050,73057,73073,73078,73081,73085,73101,73155,73187,73197,73214,73255,73271,73290,73299,73305,73305,73312,73339,73348,73358,73366,73387,73397,73399,73400,73401,73407,73414,73429,73433,73437,73440,73461,73467,73469,73471,73475,73478,73488,73504,73512,73528,73546,73588,73595,73611,73616,73622,73633,73649,73690,73706,73730,73775,73893,73897,73900,73905,73911,73920,73927,73948,73957,73964,73991,73991,73992,73994,74003,74005,74008,74012,74033,74035,74038,74039,74043,74050,74055,74059,74062,74062,74063,74069,74073,74078,74080,74081,74084,74093,74098,74101,74105,74122,74127,74136,74139,74143,74145,74151,74167,74173,74185,74191,74196,74218,74260,74270,74280,74293,74309,74334,74348,74358,74364,74366,74379,74390,74406,74412,74429,74435,74455,74459,74460,74462,74466,74484,74494,74497,74504,74509,74521,74534,74536,74538,74542,74547,74552,74558,74561,74563,74574,74586,74595,74598,74600,74601,74608,74617,74626,74631,74643,74650,74660,74663,74663,74664,74666,74670,74686,74692,74724,74736,74854,74857,74862,74865,74868,74877,74886,74911,74938,74959,74964,74974,74975,74976,74979,74986,74990,74991,74992,75000,75015,75022,75025,75025,75025,75026,75038,75041,75043,75055,75081,75086,75089,75090,75091,75093,75101,75117,75121,75143,75155,75171,75190,75193,75196,75201,75210,75226,75252,75265,75273,75280,75285,75312,75322,75325,75333,75354,75361,75371,75374,75376,75384,75391,75392,75396,75410,75413,75421,75426,75434,75438,75443,75453,75463,75465,75466,75468,75468,75471,75478,75480,75482,75483,75486,75487,75490,75492,75495,75497,75508,75512,75515,75516,75520,75527,75535,75537,75538,75550,75555,75572,75573,75573,75573,75575,75587,75591,75599,75617,75693,75696,75696,75697,75698,75698,75704,75707,75708,75709,75725,75729,75733,75733,75733,75735,75741,75749,75753,75759,75785,75790,75792,75793,75794,75796,75799,75805,75817,75823,75860,75873,75886,75888,75889,75892,75896,75909,75923,75936,75944,75945,75958,75970,75972,75973,75975,75983,76003,76004,76009,76015,76020,76023,76033,76046,76053,76065,76077,76082,76086,76092,76101,76107,76110,76112,76115,76120,76131,76134,76138,76143,76144,76146,76153,76155,76156,76156,76158,76158,76159,76160,76162,76165,76169,76169,76172,76175,76178,76179,76184,76187,76189,76190,76191,76195,76201,76206,76208,76209,76217,76219,76219,76220,76221,76222,76225,76228,76232,76240,76241,76245,76247,76247,76247,76248,76250,76251,76261,76273,76282,76283,76284,76285,76285,76285,76287,76290,76295,76317,76329,76338,76347,76349,76349,76349,76351,76356,76375,76388,76400,76407,76414,76423,76424,76426,76427,76430,76440,76450,76452,76454,76460,76467,76482,76485,76489,76492,76513,76518,76521,76527,76534,76540,76543,76545,76553,76563,76572,76575,76577,76583,76588,76592,76594,76594,76595,76597,76605,76608,76611,76624,76634,76637,76641,76643,76644,76644,76644,76646,76646,76646,76648,76651,76654,76654,76656,76657,76660,76662,76662,76663,76665,76676,76679,76683,76683,76685,76685,76685,76685,76691,76703,76703,76705,76713,76720,76724,76725,76728,76732,76752,76769,76793,76796,76800,76802,76813,76817,76820,76823,76829,76871,76880,76884,76892,76908,76916,76930,76937,76941,76953,76966,76987,76991,76998,77003,77018,77038,77051,77056,77058,77068,77078,77081,77082,77084,77085,77094,77101,77108,77111,77117,77136,77139,77141,77141,77141,77141,77147,77153,77154,77156,77161,77169,77172,77172,77173,77174,77176,77188,77188,77188,77195,77196,77200,77201,77201,77201,77201,77204,77204,77206,77207,77209,77212,77214,77214,77218,77218,77219,77333,77341,77353,77366,77372,77375,77375,77376,77378,77389,77415,77416,77427,77435,77440,77440,77444,77444,77445,77453,77463,77471,77482,77487,77496,77505,77512,77513,77515,77518,77534,77545,77577,77582,77599,77605,77621,77627,77629,77631,77638,77656,77683,77695,77705,77718,77739,77769,77779,77785,77790,77791,77811,77819,77821,77822,77824,77836,77849,77850,77854,77861,77867,77880,77884,77886,77886,77887,77898,77911,77913,77917,77919,77925,77930,77932,77934,77934,77938,77943,77946,77946,77947,77951,77957,77960,77960,77960,77963,77975,77979,77980,77980,77980,77982,77982,77983,77986,77989,77995,78072,78116,78181,78197,78209,78215,78219,78225,78242,78373,78453,78547,78565,78586,78594,78596,78598,78598,78601,78613,78645,78662,78670,78673,78682,78683,78685,78686,78688,78692,78699,78741,78759,78775,78783,78799,78809,78812,78816,78818,78826,78839,78904,78920,78934,78951,78990,79010,79018,79022,79025,79035,79042,79063,79071,79074,79084,79111,79116,79123,79131,79137,79142,79146,79155,79158,79160,79162,79181,79187,79199,79201,79202,79204,79212,79216,79219,79221,79225,79233,79242,79242,79242,79243,79245,79246,79248,79250,79253,79260,79263,79265,79265,79266,79266,79268,79271,79277,79288,79314,79319,79340,79352,79357,79362,79371,79372,79373,79378,79381,79500,79511,79543,79549,79565,79569,79571,79572,79572,79575,79602,79755,79780,79822,79838,79847,79855,79857,79861,79878,79884,79896,79928,79932,79949,79955,79957,79959,79961,79962,79966,79979,80006,80048,80058,80089,80110,80128,80135,80138,80139,80143,80163,80169,80186,80192,80208,80219,80232,80234,80238,80248,80254,80259,80268,80281,80288,80298,80313,80315,80324,80330,80332,80335,80337,80343,80347,80351,80355,80364,80369,80378,80379,80381,80382,80384,80387,80389,80390,80396,80399,80403,80403,80403,80403,80404,80406,80413,80419,80421,80424,80428,80449,80465,80482,80489,80498,80503,80505,80506,80536,80544,80554,80575,80601,80610,80618,80623,80628,80632,80751,80795,80819,80835,80876,80892,80903,80909,80914,80930,80943,80985,81052,81068,81099,81115,81128,81138,81145,81151,81163,81181,81246,81288,81345,81376,81415,81445,81458,81467,81470,81477,81495,81516,81547,81557,81599,81626,81639,81643,81649,81658,81677,81693,81734,81751,81761,81793,81847,81863,81877,81887,81905,81921,81947,81963,81975,81983,82004,82031,82034,82040,82050,82056,82073,82089,82104,82107,82109,82119,82121,82122,82132,82137,82149,82158,82171,82183,82187,82188,82188,82192,82200,82205,82206,82208,82209,82213,82213,82215,82225,82225,82228,82236,82238,82238,82243,82248,82254,82257,82267,82288,82296,82308,82317,82320,82327,82345,82354,82366,82382,82393,82425,82430,82447,82453,82469,82475,82477,82479,82483,82496,82523,82565,82575,82606,82627,82645,82652,82655,82656,82658,82662,82670,82687,82689,82705,82717,82719,82719,82725,82732,82742,82755,82771,82802,82818,82885,82927,82940,82941,82944,82945,82951,82967,82973,82989,82999,83043,83058,83062,83066,83069,83077,83082,83085,83095,83105,83111,83141,83142,83143,83148,83151,83154,83154,83157,83169,83173,83175,83176,83182,83189,83192,83194,83194,83194,83195,83200,83204,83210,83212,83213,83220,83228,83230,83234,83238,83253,83259,83291,83293,83297,83300,83309,83311,83314,83320,83336,83342,83348,83390,83399,83403,83411,83427,83435,83449,83456,83460,83468,83481,83546,83562,83576,83593,83632,83652,83660,83664,83665,83667,83677,83698,83706,83716,83725,83752,83759,83759,83761,83764,83769,83772,83781,83785,83787,83800,83819,83825,83826,83827,83827,83830,83838,83854,83863,83889,83914,83941,83954,83961,83967,83974,83986,84002,84041,84073,84093,84211,84214,84216,84217,84219,84223,84232,84240,84267,84282,84285,84289,84292,84293,84296,84302,84303,84304,84305,84307,84326,84333,84335,84335,84337,84342,84346,84351,84352,84354,84375,84381,84383,84384,84385,84389,84398,84405,84408,84417,84453,84469,84481,84483,84485,84487,84493,84509,84512,84525,84529,84536,84554,84581,84593,84603,84616,84637,84667,84677,84683,84684,84688,84708,84714,84731,84737,84753,84764,84777,84779,84782,84789,84794,84807,84816,84819,84828,84828,84843,84856,84856,84857,84858,84860,84865,84871,84874,84876,84880,84889,84894,84898,84899,84902,84908,84917,84927,84928,84956,84967,84978,84979,84979,84979,84981,84985,85001,85012,85056,85077,85080,85080,85082,85082,85086,85088,85090,85091,85091,85100,85107,85110,85110,85110,85113,85120,85126,85130,85131,85146,85157,85161,85162,85163,85165,85166,85177,85183,85187,85195,85202,85210,85210,85210,85211,85213,85223,85237,85241,85249,85261,85274,85295,85299,85306,85311,85326,85346,85359,85364,85367,85377,85384,85405,85413,85416,85426,85453,85458,85465,85470,85477,85496,85500,85504,85508,85518,85531,85538,85544,85546,85547,85548,85556,85564,85566,85568,85570,85571,85573,85574,85575,85579,85581,85585,85586,85590,85593,85594,85596,85599,85601,85602,85603,85606,85613,85623,85626,85627,85648,85648,85648,85649,85650,85651,85655,85656,85660,85662,85663,85665,85666,85666,85666,85667,85667,85674,85679,85681,85685,85686,85687,85688,85688,85688,85690,85697,85715,85724,85738,85744,85747,85747,85747,85747,85749,85751,85757,85770,85773,85780,85793,85805,85809,85812,85815,85822,85840,85850,85859,85864,85865,85885,85893,85895,85896,85898,85910,85923,85924,85928,85938,85944,85949,85958,85971,85978,85988,86003,86005,86017,86022,86028,86034,86036,86038,86041,86051,86055,86057,86062,86066,86067,86072,86078,86080,86080,86081,86083,86083,86083,86083,86086,86087,86089,86089,86091,86095,86095,86095,86095,86095,86099,86101,86101,86103,86104,86107,86107,86107,86107,86109,86110,86110,86112,86118,86123,86124,86128,86133,86135,86139,86149,86152,86154,86156,86162,86168,86173,86185,86187,86202,86212,86219,86232,86241,86246,86252,86262,86266,86267,86280,86292,86294,86295,86297,86305,86325,86326,86331,86340,86350,86368,86375,86378,86381,86385,86397,86410,86417,86420,86433,86439,86441,86443,86443,86443,86443,86446,86452,86466,86475,86493,86500,86502,86502,86502,86503,86504,86505,86509,86511,86516,86523,86523,86524,86524,86524,86525,86527,86528,86530,86534,86535,86539,86540,86541,86542,86542,86542,86563,86564,86567,86577,86584,86587,86588,86589,86591,86594,86597,86597,86600,86604,86605,86609,86611,86615,86616,86617,86619,86620,86622,86624,86626,86634,86642,86643,86644,86646,86652,86659,86672,86682,86686,86690,86694,86713,86720,86725,86732,86737,86764,86774,86777,86785,86806,86813,86823,86826,86831,86844,86864,86879,86884,86891,86895,86916,86929,86941,86949,86953,86967,86977,86979,86980,86980,86980,86988,86995,87003,87007,87013,87024,87025,87027,87028,87029,87033,87044,87059,87060,87064,87070,87077,87080,87080,87080,87083,87090,87099,87099,87100,87102,87104,87108,87108,87110,87110,87113,87134,87178,87189,87205,87209,87211,87211,87211,87212,87223,87234,87263,87263,87273,87282,87288,87291,87292,87296,87301,87310,87314,87316,87319,87325,87330,87332,87333,87334,87334,87347,87362,87362,87371,87374,87383,87396,87401,87408,87411,87413,87426,87437,87453,87459,87476,87482,87502,87506,87507,87513,87523,87553,87574,87587,87597,87609,87636,87654,87661,87665,87678,87681,87697,87703,87705,87707,87709,87721,87737,87773,87782,87785,87792,87801,87805,87806,87807,87809,87815,87836,87838,87839,87844,87848,87853,87855,87855,87857,87864,87883,87885,87886,87887,87888,87894,87897,87898,87901,87905,87908,87923,87950,87958,87967,87971,87973,87974,87976,87979,88098,88117,88149,88188,88204,88216,88223,88229,88236,88249,88276,88302,88327,88336,88352,88360,88363,88363,88364,88365,88371,88390,88403,88405,88409,88418,88421,88426,88429,88431,88431,88438,88465,88474,88484,88492,88513,88523,88525,88526,88530,88538,88558,88597,88614,88628,88644,88709,88722,88730,88734,88741,88755,88763,88779,88787,88791,88800,88842,88848,88854,88870,88876,88879,88881,88890,88893,88897,88899,88931,88937,88952,88956,88960,88962,88970,88977,88978,88980,88986,88990,88995,88996,88996,88996,88998,89001,89008,89014,89015,89017,89021,89033,89036,89036,89039,89042,89047,89048,89049,89079,89085,89095,89105,89108,89113,89121,89124,89128,89132,89147,89191,89201,89217,89223,89239,89245,89246,89249,89250,89263,89305,89372,89388,89419,89435,89448,89458,89465,89471,89471,89473,89485,89501,89503,89520,89528,89532,89534,89535,89538,89545,89563,89584,89615,89625,89667,89694,89707,89711,89713,89715,89721,89737,89743,89760,89765,89797,89808,89824,89836,89845,89863,89870,89873,89882,89894,89902,89923,89933,89936,89942,89947,89952,89952,89954,89962,89965,89965,89975,89977,89977,89981,89982,89984,89985,89990,89998,90002,90002,90003,90007,90019,90032,90041,90053,90058,90068,90069,90071,90081,90083,90086,90101,90117,90134,90140,90150,90156,90159,90186,90207,90215,90227,90243,90269,90285,90303,90313,90327,90343,90397,90429,90439,90456,90497,90513,90532,90541,90547,90551,90564,90591,90633,90643,90674,90695,90713,90720,90723,90732,90745,90775,90814,90845,90902,90944,91009,91027,91039,91045,91052,91062,91075,91091,91122,91138,91205,91247,91260,91276,91281,91287,91298,91314,91355,91371,91395,91440,91558,91562,91567,91572,91580,91589,91615,91636,91646,91654,91684,91685,91687,91692,91701,91708,91725,91741,91762,91766,91769,91771,91777,91784,91786,91787,91787,91787,91787,91791,91794,91800,91801,91803,91806,91808,91809,91811,91812,91821,91826,91835,91839,91843,91847,91853,91855,91858,91860,91866,91875,91877,91892,91902,91909,91922,91931,91936,91942,91952,91956,91958,91971,91982,91998,92004,92021,92027,92047,92051,92052,92055,92062,92080,92101,92132,92142,92184,92211,92224,92228,92229,92231,92233,92235,92241,92258,92262,92294,92306,92312,92329,92333,92335,92343,92352,92368,92410,92436,92588,92615,92618,92618,92619,92621,92625,92641,92647,92679,92691,92809,92812,92817,92818,92819,92828,92833,92838,92850,92871,92876,92902,92914,92919,92922,92924,92924,92925,92925,92927,92930,92937,92940,92942,92944,92945,92947,92948,92948,92948,92957,92965,92969,92971,92974,92978,92986,92988,92989,92991,93003,93009,93028,93030,93032,93035,93044,93048,93053,93059,93067,93074,93079,93106,93116,93119,93127,93148,93155,93165,93168,93172,93180,93200,93239,93256,93270,93286,93351,93364,93372,93374,93378,93381,93391,93407,93415,93431,93449,93491,93498,93502,93504,93505,93507,93508,93517,93520,93528,93545,93577,93589,93592,93592,93594,93596,93604,93625,93644,93737,93817,93949,93965,93971,93975,93981,93993,94009,94074,94119,94195,94201,94204,94207,94208,94208,94210,94210,94210,94211,94215,94227,94230,94230,94230,94233,94239,94243,94244,94244,94247,94252,94256,94256,94258,94260,94265,94271,94273,94277,94279,94292,94303,94304,94304,94306,94310,94323,94329,94336,94340,94341,94354,94366,94368,94369,94371,94379,94399,94400,94405,94411,94421,94451,94472,94485,94495,94507,94534,94552,94559,94561,94563,94569,94585,94591,94608,94613,94645,94656,94672,94675,94677,94678,94685,94694,94703,94708,94720,94727,94737,94745,94746,94746,94750,94750,94755,94763,94774,94776,94801,94812,94815,94815,94815,94818,94824,94837,94850,94857,94971,94972,94972,94976,94976,94978,94981,94983,94984,94986,94986,94989,94989,94989,94989,94990,94994,94995,95002,95002,95002,95015,95016,95017,95018,95018,95021,95029,95034,95036,95037,95043,95049,95049,95049,95049,95051,95054,95073,95079,95082,95089,95096,95105,95106,95108,95109,95112,95122,95132,95134,95139,95152,95172,95187,95192,95199,95203,95224,95237,95249,95253,95260,95274,95282,95298,95306,95310,95319,95361,95367,95370,95373,95377,95388,95390,95394,95397,95421,95439,95458,95462,95465,95466,95470,95477,95485,95487,95488,95500,95505,95505,95505,95505,95507,95507,95511,95514,95525,95527,95528,95528,95530,95533,95534,95536,95536,95539,95542,95544,95544,95544,95546,95546,95546,95547,95549,95553,95556,95566,95579,95583,95585,95593,95595,95596,95596,95598,95602,95607,95613,95615,95618,95627,95637,95645,95647,95650,95656,95663,95669,95672,95677,95698,95701,95705,95708,95723,95730,95736,95738,95740,95750,95760,95763,95764,95766,95767,95776,95783,95790,95802,95815,95834,95839,95841,95841,95841,95843,95852,95861,95873,95895,95900,95903,95905,95905,95905,95906,95907,95908,95917,95929,95939,95940,95942,95943,95943,95943,95945,95949,95950,95958,95962,95965,95968,95969,95970,95971,95971,95973,95982,95982,95984,95989,95995,95999,96000,96001,96003,96006,96012,96012,96015,96018,96021,96021,96025,96028,96030,96031,96032,96032,96034,96034,96035,96037,96044,96046,96047,96052,96056,96059,96070,96075,96078,96080,96083,96089,96098,96104,96108,96113,96125,96137,96144,96157,96167,96170,96175,96181,96186,96187,96207,96215,96217,96218,96220,96232,96245,96246,96254,96267,96281,96294,96298,96301,96302,96304,96317,96330,96367,96373,96385,96391,96394,96396,96397,96398,96400,96405,96431,96437,96441,96449,96455,96457,96457,96457,96461,96465,96481,96482,96483,96486,96492,96492,96493,96494,96494,96497,96574,96591,96599,96603,96615,96617,96617,96617,96619,96635,96641,96653,96653,96655,96663,96670,96674,96675,96678,96682,96693,96695,96698,96700,96703,96704,96707,96708,96710,96712,96719,96722,96722,96724,96725,96727,96737,96747,96752,96756,96764,96769,96777,96780,96794,96798,96799,96806,96814,96816,96819,96829,96836,96857,96865,96868,96878,96905,96910,96917,96925,96938,96964,96980,96989,96994,96997,97000,97019,97035,97047,97069,97073,97089,97097,97099,97100,97101,97104,97109,97135,97147,97149,97152,97164,97165,97165,97165,97168,97175,97190,97198,97199,97200,97204,97211,97214,97215,97216,97226,97231,97252,97279,97304,97313,97322,97325,97328,97333,97336,97455,97466,97498,97504,97520,97524,97526,97527,97527,97530,97540,97548,97559,97564,97573,97582,97589,97590,97592,97595,97604,97616,97627,97629,97632,97638,97643,97648,97652,97654,97656,97669,97681,97686,97693,97696,97706,97724,97728,97730,97731,97735,97755,97761,97778,97784,97800,97811,97824,97826,97832,97842,97856,97881,97897,97910,97920,97930,97972,97994,97999,98005,98017,98023,98039,98045,98047,98051,98054,98063,98068,98085,98089,98092,98097,98106,98109,98110,98112,98117,98121,98127,98128,98128,98131,98135,98140,98147,98151,98152,98155,98157,98178,98182,98185,98187,98196,98198,98199,98199,98226,98233,98242,98263,98270,98279,98285,98290,98293,98297,98416,98460,98484,98500,98541,98557,98568,98574,98579,98595,98602,98644,98662,98678,98686,98702,98712,98715,98719,98721,98723,98729,98750,98753,98757,98761,98776,98783,98789,98790,98791,98793,98803,98824,98832,98842,98851,98878,98885,98885,98891,98900,98919,98935,98976,98993,99003,99035,99089,99105,99109,99112,99117,99133,99140,99156,99166,99171,99186,99213,99216,99220,99230,99233,99236,99238,99253,99255,99257,99265,99266,99267,99271,99272,99274,99276,99286,99298,99302,99303,99303,99307,99315,99320,99321,99323,99324,99328,99328,99330,99340,99340,99343,99351,99353,99353,99358,99363,99369,99372,99382,99403,99411,99423,99432,99435,99442,99460,99469,99481,99497,99508,99540,99545,99562,99568,99584,99590,99592,99594,99598,99611,99638,99680,99690,99721,99742,99760,99767,99770,99771,99773,99777,99785,99802,99804,99820,99832,99834,99834,99840,99847,99857,99870,99886,99917,99933,100000,100042,100055,100056,100059,100060,100066,100082,100088,100104,100114,100158,100173,100177,100181,100184,100192,100197,100200,100210,100220,100226,100256,100257,100258,100263,100266,100269,100269,100272,100284,100288,100290,100293,100299,100306,100311,100323,100330,100342,100351,100361,100365,100371,100373,100375,100382,100391,100400,100411,100431,100448,100454,100486,100490,100496,100500,100509,100525,100545,100557,100573,100582,100604,100646,100656,100666,100679,100695,100720,100734,100744,100750,100758,100771,100836,100852,100866,100883,100922,100942,100950,100954,100957,100964,100982,101003,101034,101044,101086,101113,101126,101130,101142,101155,101181,101206,101247,101278,101344,101411,101465,101487,101504,101508,101510,101518,101527,101543,101585,101611,101763,101790,101803,101810,101816,101823,101835,101851,101890,101922,101942,102060,102063,102068,102071,102074,102083,102092,102117,102144,102165,102170,102198,102215,102216,102218,102220,102220,102220,102220,102222,102230,102237,102242,102244,102246,102249,102250,102250,102250,102250,102256,102262,102266,102268,102272,102276,102278,102279,102281,102282,102288,102292,102304,102307,102310,102315,102321,102324,102328,102332,102336,102340,102345,102357,102369,102376,102389,102399,102402,102407,102413,102414,102418,102438,102444,102461,102467,102483,102494,102507,102509,102515,102522,102532,102545,102561,102592,102608,102675,102717,102730,102732,102733,102734,102736,102739,102745,102761,102771,102815,102824,102922,102938,102941,102946,102953,102962,102983,103051,103144,103382,103393,103394,103394,103394,103396,103400,103416,103427,103471,103492,103505,103512,103516,103516,103518,103518,103518,103518,103520,103524,103543,103553,103553,103553,103556,103558,103559,103560,103560,103563,103576,103582,103584,103587,103589,103590,103592,103593,103595,103596,103603,103616,103617,103617,103619,103623,103633,103639,103645,103649,103652,103657,103678,103681,103685,103688,103703,103710,103716,103718,103721,103731,103738,103759,103767,103770,103780,103807,103812,103819,103825,103834,103853,103869,103910,103927,103937,103969,104023,104039,104040,104041,104041,104044,104052,104068,104077,104103,104128,104155,104168,104171,104172,104174,104176,104177,104192,104205,104211,104247,104364,104376,104376,104376,104377,104379,104389,104417,104442,104629,104631,104634,104634,104635,104636,104639,104639,104640,104642,104643,104650,104650,104650,104650,104651,104651,104653,104657,104657,104657,104662,104665,104666,104668,104668,104671,104678,104680,104681,104684,104693,104699,104699,104699,104699,104701,104706,104712,104716,104719,104723,104736,104744,104745,104747,104749,104752,104770,104775,104777,104782,104783,104803,104811,104813,104814,104816,104828,104841,104842,104848,104858,104872,104897,104913,104926,104936,104946,104988,105010,105011,105014,105015,105021,105037,105043,105059,105069,105113,105128,105133,105137,105138,105141,105147,105156,105166,105167,105195,105206,105207,105207,105207,105207,105209,105209,105214,105226,105230,105232,105300,105307,105307,105308,105309,105311,105313,105338,105418,105508,105512,105515,105516,105516,105516,105518,105521,105522,105538,105580,105582,105582,105584,105585,105585,105585,105586,105587,105592,105608,105608,105608,105611,105618,105620,105621,105622,105622,105626,105630,105632,105636,105648,105652,105657,105662,105670,105674,105679,105681,105683,105688,105706,105709,105711,105713,105714,105722,105735,105739,105742,105755,105761,105763,105765,105765,105765,105765,105768,105775,105881,105903,105921,105929,105932,105932,105935,105963,105980,105999,106081,106131,106136,106138,106139,106140,106140,106141,106306,106314,106408,106432,106442,106443,106446,106447,106448,106448,106452,106624,106628,106629,106630,106632,106634,106637,106639,106641,106655,106661,106668,106671,106671,106672,106673,106675,106677,106683,106690,106696,106697,106698,106699,106699,106699,106700,106703,106704,106708,106719,106720,106720,106723,106724,106725,106726,106726,106729,106736,106742,106744,106749,106752,106762,106772,106780,106782,106785,106790,106793,106795,106801,106808,106823,106826,106830,106833,106854,106859,106862,106870,106874,106888,106898,106900,106901,106901,106901,106909,106916,106953,106984,106996,107007,107012,107014,107017,107021,107027,107041,107171,107185,107205,107211,107213,107215,107215,107215,107230,107234,107354,107360,107366,107375,107377,107379,107379,107380,107384,107395,107416,107420,107423,107426,107430,107436,107438,107439,107439,107450,107450,107452,107453,107453,107455,107461,107466,107467,107471,107476,107483,107483,107484,107485,107486,107489,107491,107493,107496,107499,107504,107504,107505,107505,107506,107507,107512,107517,107524,107526,107528,107532,107535,107538,107544,107547,107548,107552,107556,107560,107566,107571,107574,107584,107597,107604,107616,107628,107633,107637,107641,107654,107657,107673,107679,107681,107683,107685,107697,107713,107749,107771,107799,107815,107824,107828,107832,107835,107839,107847,107868,107918,107923,107929,107933,107936,107936,107936,107939,107945,108044,108068,108070,108070,108079,108085,108087,108087,108088,108100,108103,108118,108145,108153,108162,108166,108168,108169,108171,108174,108211,108230,108243,108244,108246,108258,108259,108262,108266,108270,108272,108273,108275,108277,108279,108287,108295,108296,108297,108299,108305,108311,108314,108314,108315,108318,108321,108327,108329,108333,108337,108344,108347,108349,108351,108352,108354,108364,108371,108373,108375,108383,108390,108391,108395,108409,108412,108420,108425,108433,108437,108444,108458,108466,108482,108490,108494,108503,108545,108551,108560,108576,108588,108608,108624,108633,108637,108643,108647,108679,108685,108700,108720,108722,108731,108739,108742,108742,108743,108748,108752,108762,108768,108768,108770,108782,108785,108790,108794,108796,108798,108801,108813,108829,108832,108839,108842,108845,108846,108846,108876,108884,108894,108915,108941,108950,108958,108963,108968,108972,108987,109031,109041,109057,109063,109079,109085,109086,109089,109090,109103,109118,109118,109127,109130,109139,109152,109157,109164,109167,109168,109176,109188,109191,109192,109195,109203,109212,109215,109217,109219,109223,109241,109251,109254,109261,109266,109278,109291,109293,109295,109297,109303,109319,109325,109342,109347,109379,109390,109406,109420,109430,109448,109464,109490,109506,109518,109526,109547,109574,109577,109582,109587,109593,109596,109612,109620,109622,109622,109631,109633,109633,109643,109643,109646,109651,109664,109672,109674,109674,109675,109679,109691,109701,109703,109705,109706,109710,109711,109712,109720,109722,109724,109739,109741,109744,109747,109757,109761,109764,109791,109806,109811,109821,109837,109844,109860,109865,109868,109872,109888,109942,109974,109984,110001,110042,110058,110077,110086,110092,110092,110099,110126,110135,110145,110153,110174,110184,110186,110187,110188,110194,110201,110216,110220,110224,110227,110248,110254,110256,110258,110262,110265,110275,110291,110299,110315,110333,110375,110382,110398,110403,110409,110420,110436,110477,110493,110517,110562,110680,110684,110687,110692,110698,110707,110714,110735,110744,110751,110778,110778,110779,110781,110790,110792,110795,110799,110820,110822,110825,110827,110833,110840,110842,110843,110843,110843,110843,110847,110850,110856,110857,110859,110862,110864,110865,110867,110868,110877,110882,110891,110895,110899,110903,110909,110911,110914,110916,110922,110931,110933,110948,110958,110965,110978,110987,110992,110998,111008,111012,111014,111027,111038,111054,111060,111077,111083,111103,111107,111108,111111,111118,111136,111157,111188,111198,111240,111267,111280,111284,111285,111287,111289,111291,111297,111314,111318,111350,111362,111368,111385,111389,111391,111399,111408,111424,111466,111492,111644,111671,111674,111674,111675,111677,111681,111697,111703,111735,111747,111865,111868,111873,111874,111875,111884,111889,111894,111906,111927,111933,112011,112028,112033,112036,112043,112052,112058,112121,112215,112315,112322,112329,112331,112333,112338,112350,112356,112384,112434,112460,112468,112472,112475,112479,112483,112492,112508,112536,112558,112594,112610,112629,112632,112635,112640,112649,112665,112691,112704,112712,112719,112737,112764,112776,112786,112799,112820,112850,112860,112866,112870,112878,112898,112937,112954,112968,112984,113049,113062,113070,113076,113083,113093,113106,113122,113153,113169,113236,113278,113292,113398,113429,113457,113477,113503,113544,113587,113770,113923,114041,114139,114155,114158,114163,114170,114179,114200,114268,114361,114599,114731,114747,114753,114757,114763,114775,114791,114856,114901,114978,115124,115217,115220,115221,115222,115222,115222,115223,115304,115352,115374,115395,115399,115399,115401,115403,115403,115404,115407,115414,115419,115425,115427,115430,115432,115435,115436,115437,115438,115439,115444,115455,115457,115457,115460,115464,115469,115469,115473,115474,115476,115480,115492,115496,115501,115506,115514,115518,115523,115525,115531,115536,115539,115549,115562,115569,115581,115593,115598,115602,115604,115606,115612,115628,115634,115651,115656,115688,115699,115715,115732,115736,115738,115746,115755,115771,115813,115839,115991,116019,116122,116126,116127,116128,116129,116132,116140,116173,116228,116346,116697,116814,116819,116821,116825,116832,116845,116873,117025,117213,117356,117689,117717,117717,117718,117719,117719,117719,117735,117797,117840,117844,117847,117847,117848,117850,117852,117854,117856,117860,117879,117891,117892,117893,117893,117896,117899,117900,117901,117903,117909,117918,117920,117920,117920,117922,117925,117928,117930,117931,117933,117940,117952,117955,117957,117959,117966,117976,117981,117982,117984,117990,117997,118012,118015,118019,118022,118043,118048,118051,118055,118062,118076,118084,118100,118108,118112,118121,118163,118169,118185,118190,118196,118207,118223,118264,118280,118304,118349,118467,118479,118482,118482,118484,118486,118494,118515,118534,118627,118708,118821,118825,118825,118825,118825,118827,118830,118851,118869,118947,119277,119411,119411,119412,119413,119413,119415,119418,119597,119871,119935,119949,119988,119988,119988,119989,119991,119992,120002,120100,120104,120106,120109,120109,120109,120109,120110,120111,120114,120120,120120,120120,120123,120127,120128,120128,120128,120129,120131,120135,120137,120138,120149,120152,120159,120162,120166,120167,120171,120171,120172,120177,120187,120194,120196,120198,120201,120213,120220,120222,120225,120231,120250,120253,120255,120255,120255,120255,120261,120267,120279,120301,120306,120309,120311,120311,120311,120312,120313,120314,120562,120612,120622,120629,120633,120634,120634,120672,120964,121068,121293,121387,121391,121393,121394,121395,121395,121396,121656,122211,122216,122222,122222,122222,122224,122227,122228,122233,122272,122290,122302,122357,122357,122357,122358,122359,122363,122366,122403,122462,122465,122471,122471,122471,122471,122471,122471,122472,122473,122490,122491,122491,122494,122494,122495,122495,122495,122495,122497,122503,122503,122507,122509,122515,122522,122524,122524,122524,122527,122527,122529,122534,122538,122546,122551,122556,122560,122572,122576,122578,122582,122589,122595,122608,122612,122614,122614,122615,122626,122639,122676,122682,122694,122700,122703,122705,122706,122707,122709,122715,122845,122941,122961,122969,122976,122979,122979,122983,123039,123061,123356,123412,123421,123424,123426,123427,123427,123428,123439,123550,123581,123583,123586,123586,123588,123590,123594,123597,123600,123603,123603,123605,123605,123605,123606,123608,123612,123615,123625,123638,123644,123646,123647,123647,123648,123649,123651,123652,123657,123662,123667,123667,123667,123667,123668,123668,123670,123673,123678,123684,123686,123687,123690,123692,123696,123697,123698,123699,123703,123705,123708,123713,123716,123718,123726,123736,123746,123749,123754,123756,123764,123770,123775,123779,123788,123791,123793,123795,123814,123820,123832,123854,123858,123874,123882,123884,123885,123886,123889,123894,123920,123970,123998,124004,124016,124021,124023,124025,124032,124039,124054,124148,124151,124156,124160,124162,124163,124163,124164,124175,124180,124201,124213,124218,124223,124232,124233,124234,124239,124242,124268,124279,124290,124291,124293,124297,124304,124308,124313,124322,124323,124323,124325,124325,124326,124328,124335,124337,124338,124343,124349,124352,124355,124355,124356,124357,124359,124364,124369,124373,124375,124381,124383,124383,124384,124385,124385,124389,124393,124396,124400,124404,124408,124409,124412,124418,124421,124424,124428,124430,124434,124444,124450,124455,124464,124477,124484,124494,124509,124511,124516,124522,124534,124540,124556,124562,124564,124568,124571,124580,124586,124603,124623,124634,124643,124652,124659,124661,124663,124669,124672,124678,124687,124689,124696,124700,124702,124706,124708,124710,124713,124717,124738,124754,124771,124778,124787,124792,124794,124795,124822,124829,124838,124859,124866,124875,124881,124886,124889,124893,124913,124930,124954,124957,124961,124963,124974,124978,124981,124984,124991,124994,124994,124996,124997,124999,125009,125019,125024,125028,125030,125036,125047,125049,125050,125051,125055,125062,125068,125069,125071,125078,125088,125090,125091,125093,125095,125098,125105,125109,125114,125121,125140,125144,125148,125152,125162,125175,125182,125188,125192,125195,125200,125216,125223,125239,125249,125254,125269,125296,125299,125305,125315,125321,125338,125354,125369,125372,125374,125384,125385,125386,125390,125395,125397,125406,125416,125425,125428,125428,125428,125430,125438,125451,125456,125459,125459,125469,125469,125471,125480,125480,125482,125490,125506,125509,125515,125520,125525,125528,125555,125576,125584,125596,125612,125638,125654,125672,125682,125696,125712,125723,125755,125760,125777,125783,125799,125805,125807,125809,125811,125824,125836,125841,125848,125851,125861,125879,125883,125885,125887,125890,125899,125907,125910,125911,125914,125926,125934,125935,125938,125945,125950,125963,125972,125975,125984,125984,125999,126012,126013,126016,126017,126023,126039,126045,126061,126071,126115,126130,126134,126139,126144,126152,126161,126187,126208,126218,126226,126256,126256,126257,126260,126263,126270,126273,126289,126301,126304,126306,126307,126313,126320,126323,126325,126325,126325,126326,126331,126335,126341,126343,126344,126351,126359,126361,126365,126369,126384,126390,126422,126424,126428,126431,126440,126442,126445,126451,126467,126473,126479,126521,126530,126534,126542,126558,126566,126580,126587,126591,126599,126612,126677,126693,126707,126724,126763,126783,126791,126795,126796,126798,126808,126829,126837,126847,126856,126883,126890,126890,126892,126895,126900,126903,126912,126916,126918,126931,126950,126956,126957,126958,126958,126961,126969,126985,126994,127020,127045,127072,127085,127092,127098,127105,127117,127133,127172,127204,127224,127342,127345,127347,127348,127350,127354,127363,127371,127398,127413,127416,127444,127461,127462,127464,127466,127466,127466,127466,127468,127476,127483,127488,127490,127492,127495,127496,127496,127496,127496,127502,127508,127512,127514,127518,127522,127524,127525,127527,127528,127534,127538,127550,127553,127556,127561,127567,127570,127574,127578,127582,127586,127591,127603,127615,127622,127635,127645,127648,127653,127659,127660,127664,127684,127690,127707,127713,127729,127740,127753,127755,127761,127768,127778,127791,127807,127838,127854,127921,127963,127976,127978,127979,127980,127982,127985,127991,128007,128017,128061,128070,128168,128184,128187,128192,128199,128208,128229,128297,128390,128628,128639,128640,128640,128640,128642,128646,128662,128673,128717,128738,129011,129104,129108,129109,129113,129119,129128,129137,129370,129665,129687,129743,129747,129747,129750,129757,129765,129785,129881,130012,130025,130031,130035,130038,130040,130045,130056,130068,130099,130136,130149,130162,130164,130165,130168,130172,130185,130199,130212,130220,130232,130245,130266,130270,130277,130282,130297,130317,130330,130335,130341,130351,130381,130402,130415,130425,130437,130464,130482,130489,130495,130504,130523,130539,130580,130597,130607,130639,130693,130709,130726,130730,130732,130740,130749,130765,130807,130833,130985,131012,131260,131356,131384,131395,131412,131438,131477,131544,131818,132056,132407,132524,132529,132531,132535,132542,132555,132583,132735,132922,133424,134009,134009,134010,134011,134012,134012,134012,134086,134383,134487,134583,134621,134621,134622,134623,134624,134624,134627,134699,134704,134721,134721,134723,134723,134725,134725,134726,134727,134729,134735,134741,134743,134743,134743,134745,134747,134747,134748,134748,134748,134754,134762,134766,134768,134771,134774,134778,134781,134781,134783,134788,134792,134800,134805,134810,134814,134826,134830,134832,134836,134846,134852,134857,134866,134879,134886,134896,134911,134913,134914,134917,134918,134924,134940,134946,134962,134972,135016,135031,135129,135145,135148,135153,135160,135169,135190,135258,135351,135589,135915,136002,136002,136002,136002,136003,136005,136017,136061,136215,137409,139154,139192,139193,139194,139194,139194,139198,139277,139782,140378,140524,141730,141990,141990,141991,141992,141993,141997,142039,142081,142088,142090,142090,142111,142111,142111,142112,142115,142127,142127,142127,142129,142131,142131,142131,142131,142131,142132,142133,142133,142134,142138,142140,142145,142147,142150,142151,142153,142153,142153,142156,142160,142163,142166,142168,142172,142180,142186,142186,142189,142193,142199,142204,142206,142206,142206,142206,142212,142221,142235,142244,142262,142269,142271,142271,142271,142272,142273,142275,142357,142407,142412,142414,142415,142416,142416,142417,142582,142589,143095,143189,143199,143202,143206,143208,143209,143238,143822,144611,144628,144708,144708,144708,144709,144710,144711,144714,144830,144982,145142,145603,145784,145784,145784,145785,145787,145791,145798,145988,145993,146073,146074,146110,146110,146110,146110,146110,146111,146122,146123,146124,146124,146124,146124,146124,146124,146124,146126,146131,146131,146132,146133,146135,146138,146139,146139,146139,146140,146140,146140,146144,146145,146149,146152,146159,146162,146173,146174,146176,146180,146186,146192,146202,146206,146208,146208,146209,146222,146229,146237,146241,146247,146258,146259,146261,146262,146263,146267,146279,146409,146423,146443,146449,146451,146453,146453,146453,146468,146471,146766,146999,147008,147017,147023,147027,147028,147033,147125,147398,147401,147401,147402,147402,147403,147405,147407,147413,147428,147455,147459,147462,147463,147463,147463,147465,147468,147469,147485,147527,147533,147540,147558,147558,147558,147559,147561,147562,147565,147611,147614,147614,147615,147615,147615,147615,147615,147616,147623,147625,147626,147627,147628,147629,147631,147632,147632,147633,147635,147636,147636,147639,147639,147639,147641,147648,147654,147656,147660,147660,147664,147668,147672,147675,147681,147686,147689,147692,147704,147708,147744,147753,147756,147763,147772,147776,147777,147778,147780,147786,147807,147857,147862,147868,147872,147875,147875,147875,147878,147884,147983,148077,148141,148146,148155,148162,148165,148171,148187,148266,148271,148286,148289,148292,148294,148298,148301,148304,148309,148312,148315,148321,148324,148325,148325,148327,148328,148334,148341,148353,148354,148355,148356,148356,148356,148357,148360,148361,148365,148376,148378,148380,148380,148380,148380,148381,148382,148387,148389,148394,148394,148395,148396,148396,148397,148398,148398,148399,148401,148403,148405,148409,148410,148411,148412,148416,148418,148421,148422,148424,148430,148437,148443,148446,148448,148456,148466,148475,148478,148480,148486,148502,148508,148511,148513,148522,148525,148529,148531,148563,148569,148584,148604,148606,148615,148623,148626,148626,148627,148632,148636,148646,148655,148667,148674,148686,148691,148698,148704,148707,148709,148712,148724,148740,148743,148750,148753,148756,148757,148757,148787,148793,148803,148813,148816,148821,148829,148832,148836,148840,148842,148846,148856,148859,148861,148863,148869,148875,148880,148892,148897,148897,148898,148898,148899,148900,148905,148910,148917,148919,148920,148922,148926,148927,148927,148928,148931,148935,148938,148940,148943,148947,148951,148951,148952,148953,148953,148955,148961,148963,148969,148978,148984,148987,148989,148992,148997,149008,149011,149015,149027,149036,149054,149061,149064,149073,149085,149093,149114,149124,149127,149132,149137,149143,149146,149162,149170,149172,149172,149181,149183,149184,149194,149199,149211,149220,149233,149245,149249,149250,149250,149253,149262,149272,149281,149283,149288,149292,149293,149294,149304,149306,149309,149324,149340,149357,149363,149373,149379,149382,149409,149424,149429,149439,149455,149462,149478,149483,149486,149490,149496,149503,149516,149526,149530,149534,149538,149557,149564,149569,149573,149580,149583,149585,149587,149588,149590,149600,149607,149609,149610,149616,149623,149627,149628,149629,149631,149642,149648,149650,149654,149659,149669,149679,149681,149682,149684,149684,149687,149694,149697,149700,149704,149715,149717,149721,149724,149748,149766,149785,149789,149792,149797,149803,149812,149819,149840,149849,149856,149883,149884,149886,149891,149900,149907,149924,149940,149961,149965,149968,149969,149973,149980,149985,149989,149992,149992,149993,149999,150003,150008,150010,150011,150014,150023,150028,150031,150035,150052,150057,150066,150069,150073,150075,150081,150097,150103,150115,150121,150126,150148,150190,150200,150210,150223,150239,150264,150278,150288,150294,150296,150309,150320,150336,150342,150359,150365,150385,150389,150390,150392,150396,150414,150424,150427,150434,150439,150451,150464,150466,150468,150472,150477,150482,150488,150491,150493,150504,150516,150525,150528,150530,150531,150538,150547,150556,150561,150573,150580,150590,150593,150593,150594,150596,150600,150616,150622,150654,150666,150784,150787,150792,150795,150798,150807,150816,150841,150868,150889,150894,150920,150932,150937,150940,150942,150942,150943,150943,150945,150948,150955,150958,150960,150962,150963,150965,150966,150966,150966,150975,150983,150987,150989,150992,150996,151004,151006,151007,151009,151021,151027,151046,151048,151050,151053,151062,151066,151071,151077,151085,151092,151097,151124,151134,151137,151145,151166,151173,151183,151186,151190,151198,151218,151257,151274,151288,151304,151369,151382,151390,151392,151396,151399,151409,151425,151433,151449,151467,151509,151516,151520,151522,151523,151525,151526,151535,151538,151546,151563,151595,151607,151610,151610,151612,151614,151622,151643,151662,151755,151835,151967,151983,151989,151993,151999,152011,152027,152092,152137,152214,152360,152453,152456,152457,152458,152458,152458,152459,152540,152588,152610,152631,152635,152635,152637,152639,152639,152640,152643,152650,152655,152661,152663,152666,152668,152671,152672,152673,152674,152675,152680,152691,152693,152693,152696,152700,152705,152705,152709,152710,152712,152716,152728,152732,152737,152742,152750,152754,152759,152761,152767,152772,152775,152785,152798,152805,152817,152829,152834,152838,152840,152842,152848,152864,152870,152887,152892,152924,152935,152951,152968,152972,152974,152982,152991,153007,153049,153075,153227,153255,153358,153362,153363,153364,153365,153368,153376,153409,153464,153582,153933,154050,154055,154057,154061,154068,154081,154109,154261,154448,155237,155822,155850,155851,155853,155857,155860,155870,155964,156470,156574,156866,156904,156904,156905,156909,156916,156926,156976,157224,157243,157260,157288,157290,157290,157293,157301,157319,157341,157448,157457,157466,157468,157468,157468,157470,157475,157494,157507,157519,157526,157539,157551,157555,157558,157561,157568,157586,157596,157605,157610,157623,157643,157658,157663,157670,157674,157695,157708,157720,157726,157736,157750,157775,157791,157804,157814,157824,157866,157888,157904,157909,157915,157926,157942,157983,157999,158023,158068,158186,158284,158300,158303,158308,158315,158324,158345,158413,158506,158744,159250,159483,159547,159559,159571,159588,159613,159679,159831,160218};
 3 class MagicFingerprint {
 4     private:
 5         int magic(const int &x) {
 6             if(x<10) return x;
 7             int t=0;
 8             for(register long long k=10;k<x;k*=10) {
 9                 t+=std::abs(x/(k/10)%10-x/k%10)*(k/10);
10             }
11             return magic(t);
12         }
13     public:
14         int countLuckyNumbers(int A,int B) {
15             A--;
16             int ret=s[B/100000]-s[A/100000];
17             int a=A/100000*100000,b=B/100000*100000;
18             while(a<A) {
19                 if(magic(++a)==7) ret--;
20             }
21             while(b<B) {
22                 if(magic(++b)==7) ret++;
23             }
24             return ret;
25         }
26 };

 

posted @ 2018-01-05 13:00  skylee03  阅读(937)  评论(0编辑  收藏  举报