2020 Multi-University Training Contest 1---- HDU--6753、Cookies (分块打表)

题目连接

题面:
在这里插入图片描述

题意:

给定函数 f ( i ) = ∑ j = 1 i d i v m e d ( j ) f(i)=\sum\limits_{j=1}^idivmed(j) f(i)=j=1idivmed(j)

d i v m e d ( x ) divmed(x) divmed(x) 表示 x x x 所有的因子从小到大排序后第 c n t + 1 2 \frac{cnt+1}{2} 2cnt+1 个因子。 c n t cnt cnt 表示 x x x 因子的个数。

给定 f f f 函数的前 n n n 项,然后给个 m m m 个操作 p i p_i pi

按顺序进行 m m m 个操作,每次操作将下标为 c ∗ p i c*p_i cpi f f f 的项删除,其中 c c c 为正整数。
每次进行删除操作之后对剩余的 f f f 1 1 1 开始重新编号。

问最终序列中第 k k k 项的值。

题解:
大题思路:先求出最终序列中的第 k k k 项是原序列中的第几项,假设为第 x x x项,然后求 f ( x ) f(x) f(x)

(1)因为每次删除操作都会重新编号,我们倒着从 m m m 1 1 1 枚举 p i p_i pi,然后让 k k k 加上这次删除的 k k k 前面的数的个数,即 k + = ( k − 1 ) / ( p i − 1 ) k+=(k-1)/(p_i-1) k+=(k1)/(pi1)。注意特判 p i = 1 p_i=1 pi=1

(2)现在已经处理出要求的 f ( x ) f(x) f(x),考虑怎么求 f ( x ) f(x) f(x)

容易发现 d i v m e d ( x ) divmed(x) divmed(x) 就是小于等于 x \sqrt x x 最大的 x x x 的因子。
那么对于一个因子 d d d d d d 只对于 d ∗ d ≤ x d*d\le x ddx x x x 有贡献。
我们可以用筛法处理。

但是 x x x 1 e 10 1e10 1e10 级别的,直接筛时间复杂度,空间复杂度扛不住。

考虑本地分块打表前缀和,我们将 1 e 10 1e10 1e10 分为 4 e 3 4e3 4e3 段,每段长度 2.5 e 6 2.5e6 2.5e6
我们设 a [ i ] a[i] a[i] 为第 i i i 段的 d i v m e d ( x ) divmed(x) divmed(x) 的和, s u m [ i ] sum[i] sum[i] a [ i ] a[i] a[i] 的前缀和。
a [ i ] , s u m [ i ] a[i],sum[i] a[i],sum[i] 我们可以离线本地打表,利用类似于埃氏筛的方法,筛出每一段的和然后累加前缀和。时间复杂度大约是 O ( 4 e 3 ∗ 2.5 e 6 ∗ l o g ( 1 e 10 ) ) O(4e3*2.5e6*log(\sqrt{1e10})) O(4e32.5e6log(1e10 )),其实要比这个上界小一点,大约需要十分钟左右。

假设现在表已经打好,考虑怎么求 f ( x ) f(x) f(x)
其中 x / 2.5 e 6 x/2.5e6 x/2.5e6 的整数部分可以直接由 s u m sum sum 数组获取,只需要用类似于埃氏筛的方法筛出 [ x 2500000 ∗ 2500000 + 1 , x ] [\frac{x}{2500000}*2500000+1,x] [2500000x2500000+1,x] 这个区间的和即可。

时间复杂度大约是 O ( T ∗ 2.5 e 6 ∗ l o g ( 1 e 10 ) ) = O ( 60 ∗ 2.5 e 6 ∗ 17 = 6 e 9 ) O(T*2.5e6*log(\sqrt{1e10}))=O(60*2.5e6*17=6e9) O(T2.5e6log(1e10 ))=O(602.5e617=6e9) 左右。

把各种快读加上,各种氧气吸上,莽就是了。

代码:

#pragma GCC optimize("Ofast","inline","-ffast-math")
#pragma GCC target("avx,sse2,sse3,sse4,mmx")
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<string>
#include<queue>
#include<bitset>
#include<map>
#include<unordered_map>
#include<unordered_set>
#include<set>
#include<ctime>
#define ui unsigned int
#define ll long long
#define llu unsigned ll
#define ld long double
#define pr make_pair
#define pb push_back
#define lc (cnt<<1)
#define rc (cnt<<1|1)
#define len(x)  (t[(x)].r-t[(x)].l+1)
#define tmid ((l+r)>>1)
#define fhead(x) for(int i=head[(x)];i;i=nt[i])
#define max(x,y) ((x)>(y)?(x):(y))
#define min(x,y) ((x)>(y)?(y):(x))
using namespace std;

char buffer[100001],*S,*T;
inline char Get_Char()
{
    if (S==T)
    {
        T=(S=buffer)+fread(buffer,1,100001,stdin);
        if (S==T) return EOF;
    }
    return *S++;
}
inline ll read()
{
    char c;ll re=0;
    for(c=Get_Char();c<'0'||c>'9';c=Get_Char());
    while(c>='0'&&c<='9') re=re*10+(c-'0'),c=Get_Char();
    return re;
}

const int inf=0x3f3f3f3f;
const ll lnf=0x3f3f3f3f3f3f3f3f;
const double dnf=1e18;
const double alpha=0.75;
const int mod=1e9+7;
const double eps=1e-8;
const double pi=acos(-1.0);
const int hp=13331;
const int maxn=2500000;
const int maxm=100100;
const int maxp=100100;
const int up=1100;

const ll sum[]={0,876804130,2440016214,4442079417,6796397198,9453130930,12378842634,15549296532,18945735140,22552739022,26357880142,30350730168,34522226311,38864607459,43370855773,48034776321,52851120150,57814443465,62920511520,68165149214,73544388411,79054965293,84693371965,90456649846,96341923548,102346535197,108468027108,114704234668,121052855892,127511593606,134078801811,140752321808,147530525814,154411744586,161394260847,168476578661,175657204263,182934792640,190307738982,197775233093,205335432313,212987436143,220730091928,228562218234,236482887875,244490722539,252585143640,260764708197,269028813401,277376484263,285806547990,294319155581,302911969948,311585238476,320337932327,329168985300,338078331500,347064764428,356126904009,365265590324,374479046967,383767002273,393128824758,402563818412,412071584539,421651506953,431302347429,441024444161,450816601984,460678690941,470610026196,480609848660,490678737353,500815440928,511018360017,521289666715,531625700947,542028677770,552496944462,563030721969,573628695452,584290986937,595016835778,605806315332,616658641813,627573971154,638551420511,649590660993,660691411002,671853622408,683076586115,694360275402,705703430496,717106465197,728568905143,740090542643,751670564166,763310089530,775007198483,786762224279,798574278348,810444262447,822371026466,834355038820,846394348784,858490221400,870641670534,882849175510,895111614399,907429636763,919801850943,932228589736,944710197581,957245179198,969833674792,982475815043,995171442778,1007920247051,1020721673854,1033575641618,1046482546386,1059440947430,1072451347160,1085513716355,1098626670235,1111791648947,1125007684770,1138274847892,1151592351950,1164959970417,1178377325244,1191845542658,1205364329160,1218931450424,1232548769010,1246214663025,1259930039782,1273694145259,1287507041670,1301367805412,1315278320731,1329236570686,1343242009955,1357296335082,1371397266292,1385544806264,1399742785845,1413985386995,1428274984002,1442612504610,1456995953877,1471425993694,1485902479271,1500425470855,1514993929086,1529608724341,1544268241810,1558974383447,1573724510326,1588521591214,1603363478451,1618249813110,1633180917093,1648156060033,1663177384585,1678241487891,1693351769871,1708503868218,1723701210594,1738942224337,1754226925177,1769556199899,1784926986685,1800341949645,1815800543184,1831301805083,1846844524088,1862431744904,1878061202914,1893734143475,1909448245630,1925205213101,1941004323573,1956845371848,1972728597399,1988652991498,2004619670350,2020628497467,2036677876168,2052769255670,2068901074546,2085074729051,2101289452488,2117545023222,2133841913925,2150179214819,2166556599345,2182974837757,2199433426565,2215933037851,2232472078128,2249051700005,2265670568563,2282330082338,2299028449683,2315768286239,2332545837903,2349364361806,2366220533546,2383117189487,2400052639835,2417026566595,2434041430520,2451093351293,2468185735811,2485315489530,2502483780275,2519692083550,2536938063993,2554222837313,2571543769701,2588905113233,2606303759984,2623740725448,2641214906745,2658727869793,2676278303373,2693865423493,2711490722646,2729153826068,2746855381447,2764592200566,2782366735665,2800179479162,2818026973282,2835912604748,2853836131190,2871795248490,2889792181778,2907825611071,2925894773985,2944001518171,2962143825603,2980322957193,2998538513178,3016788598828,3035077354773,3053401010685,3071759396635,3090156429047,3108588025071,3127053939344,3145556760087,3164094893644,3182669383711,3201278139049,3219923471842,3238603995200,3257318640430,3276068532233,3294853960153,3313673854078,3332528979445,3351420889227,3370346958208,3389306611697,3408299987804,3427328913557,3446393284277,3465492757760,3484624418681,3503790427229,3522991998088,3542228957257,3561498853956,3580802026110,3600140410802,3619510902878,3638917946453,3658357485367,3677830917026,3697337943992,3716878238853,3736453294653,3756060875184,3775702579178,3795377667572,3815085843842,3834826768518,3854600794704,3874409461081,3894251869691,3914126533570,3934032980644,3953973021920,3973945196474,3993950661701,4013990798996,4034062194343,4054165498375,4074302326282,4094471729513,4114673898015,4134905945247,4155174564639,4175472967780,4195803398817,4216166416730,4236560627958,4256988567922,4277446493296,4297940428590,4318463222022,4339018647996,4359605464281,4380224375287,4400874945988,4421557539310,4442271247462,4463017896327,4483793775611,4504603278144,4525442642295,4546313566263,4567216525246,4588151014830,4609115723858,4630113208800,4651141280618,4672199727286,4693288200272,4714410823823,4735561819902,4756744949968,4777957337736,4799201867059,4820478017811,4841781995722,4863118275710,4884485186696,4905882578598,4927313151578,4948769815155,4970258885924,4991778623762,5013327890953,5034907841843,5056517682344,5078160172538,5099828745862,5121528763566,5143260962145,5165020652052,5186813039098,5208631591295,5230484181652,5252363452646,5274274912065,5296214583778,5318184307510,5340184104759,5362212774081,5384272158324,5406359371624,5428476805819,5450623821908,5472799914701,5495006353700,5517241038937,5539505144369,5561798854769,5584121710684,5606472926365,5628855562649,5651267016143,5673706446996,5696173980225,5718671399188,5741197989805,5763754388824,5786337918334,5808950708095,5831594024832,5854264078709,5876962859421,5899690429003,5922448842417,5945232382752,5968047108256,5990887286647,6013760535447,6036659875572,6059588012488,6082541556212,6105527475369,6128539704122,6151580083381,6174650301278,6197747735511,6220874181590,6244027630928,6267207721381,6290418033897,6313655392875,6336922336749,6360216285110,6383537831543,6406886947991,6430264125355,6453669598045,6477103260771,6500562735201,6524050675769,6547565946835,6571111049803,6594681484057,6618280056504,6641905582295,6665561177107,6689243605767,6712950917286,6736686196518,6760450187833,6784240699174,6808058246946,6831903441736,6855776191186,6879676521811,6903602876845,6927557103978,6951538741417,6975546711840,6999579811839,7023643320815,7047731677103,7071847298553,7095991779688,7120160269718,7144357276986,7168580344215,7192829872982,7217107919958,7241410540024,7265740810431,7290099124040,7314481167119,7338891358307,7363328663235,7387789508843,7412279182991,7436796431964,7461340693001,7485908445209,7510502642541,7535125681642,7559773468090,7584447751232,7609147636435,7633874544597,7658629073351,7683406930769,7708212950851,7733042872232,7757902102610,7782783649459,7807692809844,7832629671065,7857590689768,7882577828333,7907590364526,7932629938225,7957695594209,7982786453365,8007903409859,8033044523095,8058211723608,8083406649167,8108626233470,8133872264217,8159141725928,8184438375594,8209761192130,8235107692243,8260480459147,8285880230408,8311302423913,8336752656255,8362228338975,8387728437362,8413253234013,8438805525103,8464379490982,8489982100511,8515608436107,8541261624814,8566938201989,8592640355439,8618368027257,8644121978127,8669898425991,8695702055001,8721527931237,8747380738746,8773258627994,8799162591281,8825089248790,8851041253222,8877020524461,8903022993313,8929049575967,8955101913009,8981177776331,9007281629447,9033405222829,9059557927032,9085732339292,9111932784357,9138159122644,9164407294775,9190681401407,9216980502396,9243303293423,9269650846891,9296022847216,9322419478196,9348842890657,9375286834266,9401755915899,9428249695503,9454770007698,9481312375986,9507879766278,9534470914867,9561086407243,9587726790249,9614390597896,9641078911106,9667792717996,9694528201897,9721289922654,9748073647788,9774881949095,9801715812346,9828573404200,9855453715649,9882360610885,9909290760702,9936241706789,9963218965825,9990217526217,10017243240952,10044293126872,10071362637180,10098459091052,10125578326469,10152720055440,10179888598597,10207080917673,10234294430501,10261533735460,10288796137429,10316082679240,10343390600381,10370724896748,10398078938858,10425457559744,10452862274941,10480287487806,10507740476651,10535214639058,10562711559153,10590232231069,10617774685876,10645343553872,10672934602692,10700548165462,10728185967911,10755846784115,10783529263873,10811239042481,10838968866494,10866722094681,10894500378024,10922298791939,10950121162906,10977968943222,11005837468812,11033730315028,11061646820028,11089584763560,11117545362440,11145529733630,11173537116323,11201568488801,11229621573308,11257699084498,11285799334036,11313920445743,11342065296367,11370233407200,11398424832639,11426638330767,11454875245464,11483134179233,11511418175462,11539721403804,11568046507630,11596398169975,11624769077183,11653165625357,11681584280677,11710025369893,11738485744653,11766971374520,11795480384301,11824009679086,11852564385981,11881141045599,11909737161396,11938360410626,11967001704872,11995667046676,12024357167194,12053068074862,12081798464840,12110552233896,12139329723252,12168128518784,12196952863888,12225797675425,12254663594362,12283552642242,12312463550243,12341395740871,12370351404138,12399330628875,12428328241505,12457350032248,12486393598122,12515459792667,12544550925821,12573659548825,12602792935181,12631945328645,12661121031945,12690318029799,12719540113262,12748781333979,12778044297547,12807331487010,12836641199793,12865968112874,12895319707217,12924695380870,12954089026654,12983506139535,13012946912747,13042407037207,13071889647431,13101392913736,13130918160235,13160467597235,13190037438136,13219626043888,13249240471265,13278874968774,13308531327098,13338209299534,13367908655524,13397628212531,13427369545944,13457132378306,13486919896356,13516726993456,13546553117572,13576405944581,13606276456464,13636167936459,13666082369448,13696016473526,13725972497268,13755954475674,13785955642106,13815973499090,13846016446952,13876079984935,13906162730514,13936272281160,13966400111856,13996551128225,14026721177566,14056909560616,14087122234951,14117357651096,14147611656456,14177887349809,14208188086250,14238502520360,14268841450835,14299203089744,14329587320163,14359988628421,14390411601956,14420857547231,14451323736976,14481812080155,14512317238608,14542847099926,14573397344212,14603967554926,14634559593302,14665172303935,14695806770692,14726460520018,14757135655583,14787830083845,14818547791460,14849287139058,14880045337845,14910825624632,14941626852044,14972445177273,15003287430753,15034149993427,15065032599651,15095938551048,15126860358384,15157806616491,15188773292204,15219756047385,15250765303309,15281793027048,15312840743637,15343907896670,15375000483266,15406107894867,15437242031665,15468388929754,15499562633858,15530753755416,15561967248266,15593200703091,15624453015841,15655727403711,15687019136388,15718338097607,15749670809167,15781027950986,15812403144658,15843800832571,15875220061433,15906656303505,15938112128546,15969591104558,16001086752089,16032606253901,16064145785921,16095702993970,16127283933823,16158883131351,16190501354713,16222142289103,16253800419819,16285479634517,16317179394899,16348901330630,16380637654784,16412401489527,16444182401209,16475981039057,16507800576555,16539641658703,16571504226363,16603386515510,16635285895497,16667207664825,16699151426705,16731110799171,16763090139274,16795090933610,16827113514395,16859152844510,16891212729282,16923292194410,16955397292062,16987516406195,17019654434625,17051816038423,17083994062666,17116194451208,17148413782477,17180653350970,17212911657162,17245192987884,17277489770080,17309808923297,17342146222197,17374503245407,17406881764175,17439278400535,17471696886571,17504130535145,17536587284018,17569064030796,17601561150511,17634075842430,17666609713134,17699165339753,17731739839469,17764332093128,17796947730396,17829575634800,17862230367410,17894900842562,17927593169791,17960302985300,17993034399709,18025784481529,18058550570771,18091338522481,18124148308138,18156976637076,18189822475686,18222689510072,18255574272000,18288480396705,18321404003437,18354346951717,18387312530239,18420293024717,18453296644720,18486314031890,18519352891879,18552413961562,18585494625081,18618591252061,18651710450904,18684846201099,18718005082199,18751179560125,18784371445770,18817584695301,18850814513179,18884071107920,18917340663563,18950628697923,18983938602082,19017266419734,19050613628218,19083981700990,19117366983802,19150770171044,19184194886746,19217638725446,19251100428297,19284580895369,19318078119585,19351598767438,19385135193038,19418693222363,19452269823343,19485863547787,19519479168975,19553109959167,19586759985256,19620432021389,19654120946789,19687829002869,19721555980659,19755302277199,19789065533635,19822846511498,19856652659819,19890471185372,19924310792039,19958170964992,19992048658788,20025944736326,20059859031741,20093796340364,20127748200026,20161719672014,20195710476232,20229720332626,20263746861094,20297794231010,20331858178227,20365939503020,20400042803612,20434165308803,20468303705758,20502462943057,20536635253325,20570831548740,20605044500964,20639277458657,20673528976881,20707798643979,20742086788091,20776394244297,20810717810876,20845064730247,20879427941747,20913809345858,20948204987296,20982623008964,21017058728096,21051515016245,21085989871716,21120478512010,21154991345014,21189518085035,21224066327509,21258631839572,21293213280257,21327817675607,21362435246785,21397076112872,21431733023681,21466407809590,21501099790453,21535812571805,21570541595969,21605293041393,21640056087109,21674843575885,21709646672156,21744467645255,21779306593171,21814163615155,21849040954054,21883938606401,21918850748999,21953783741303,21988731313641,22023696020742,22058683685107,22093686745591,22128707985906,22163749768485,22198805693172,22233883367986,22268976573483,22304089849117,22339221115949,22374368639834,22409536186021,22444716451021,22479922314002,22515140939603,22550378575571,22585632085366,22620911642812,22656203802144,22691510830762,22726844922169,22762190597911,22797554774797,22832935557025,22868337979582,22903753725316,22939192147617,22974646718427,23010117355018,23045607449065,23081115680862,23116637182757,23152185068015,23187746616177,23223324605242,23258920090274,23294537548171,23330169987598,23365822951918,23401489200699,23437176046511,23472878875455,23508602288031,23544340162948,23580097468364,23615871651358,23651666838812,23687474245746,23723305191458,23759151086761,23795014052038,23830893687211,23866796508928,23902711452461,23938643335329,23974595062638,24010566606311,24046552308121,24082559028243,24118580954263,24154622500795,24190678427891,24226754064051,24262842795319,24298957792916,24335088155832,24371230386613,24407391683387,24443573883201,24479771309843,24515981487836,24552219835021,24588468197473,24624737839518,24661021824919,24697322751379,24733646838429,24769981697245,24806336925673,24842710056620,24879101682840,24915507593351,24951931690732,24988377073799,25024835775168,25061312470997,25097807734630,25134317749819,25170848283148,25207396179844,25243957370342,25280539763283,25317138518916,25353754663899,25390387481345,25427038329793,25463704278119,25500387344788,25537088726308,25573810567307,25610543312047,25647299897204,25684073409649,25720860151104,25757665276504,25794487665538,25831327875430,25868184843338,25905058363930,25941949359557,25978858679857,26015785617146,26052732396726,26089689302294,26126666681448,26163663185598,26200674645869,26237704223165,26274748251549,26311808867125,26348887931000,26385986303292,26423099636646,26460231277728,26497380288368,26534543778064,26571725954000,26608925964095,26646142863373,26683374816494,26720623956064,26757891215185,26795173806211,26832478274516,26869795216846,26907127651158,26944484312289,26981849818428,27019233320578,27056639587257,27094060012890,27131495723641,27168948243745,27206420146661,27243905578576,27281411570519,27318931745380,27356467726349,27394024393699,27431596053560,27469183270752,27506788410449,27544410355891,27582046658372,27619705163476,27657378539290,27695065246546,27732772890506,27770492570639,27808233524651,27845988725305,27883761700075,27921548794307,27959355954098,27997178626353,28035018922135,28072882882059,28110753335416,28148643328439,28186543591662,28224470900290,28262413503516,28300372564840,28338339698644,28376334119518,28414336525220,28452362995532,28490400643499,28528457828446,28566531838990,28604622012135,28642726557707,28680851485306,28718986349949,28757146088698,28795321656664,28833511750325,28871713989258,28909937433950,28948175702081,28986430364305,29024705493448,29062993296924,29101294246795,29139614934748,29177954174462,29216307060048,29254679841967,29293066413003,29331467932362,29369892933488,29408326738720,29446778142374,29485247542928,29523736540569,29562234536869,29600756378772,29639292141887,29677841704589,29716408627109,29754994468480,29793592293823,29832209532464,29870844876946,29909493416785,29948160779457,29986841446548,30025542577534,30064258068534,30102991475049,30141734390651,30180499213801,30219280041053,30258078465502,30296888473084,30335717088781,30374565004550,30413429168781,30452303408478,30491199301802,30530108226098,30569035348521,30607976286616,30646931817896,30685909518529,30724901820932,30763908523760,30802931677137,30841967659241,30881028923191,30920103395469,30959191337173,30998292331650,31037411081580,31076548963913,31115707734611,31154875606902,31194058537127,31233257761324,31272480597069,31311710915082,31350959254835,31390224367771,31429507624688,31468805512059,31508118486497,31547449944680,31586793887562,31626155911021,31665536627791,31704930615522,31744338248520,31783761686731,31823204418876,31862661269628,31902138277199,31941627261924,31981132627399,32020655092062,32060195259728,32099750240707,32139316390000,32178904718812,32218505702113,32258120815157,32297755361993,32337403230259,32377065494045,32416748824957,32456444899195,32496160574577,32535887206509,32575631111972,32615393903523,32655170229279,32694961925978,32734769757842,32774596470204,32814429288272,32854286531646,32894156658297,32934045893092,32973947226319,33013867899965,33053800403722,33093752994348,33133717312884,33173697151792,33213700963590,33253710369109,33293741273785,33333781818871,33373844833782,33413922553560,33454009942278,33494118621001,33534243877581,33574382308478,33614539848374,33654709839536,33694897409692,33735100748529,33775313422180,33815546133028,33855794977012,33896058810690,33936341333354,33976635028668,34016947054699,34057274304542,34097619223280,34137974805787,34178352016681,34218742702382,34259147905732,34299565250745,34340005553868,34380454848318,34420922635525,34461410326049,34501906209876,34542418770651,34582947973039,34623488907321,34664052090737,34704629341067,34745219736188,34785826220801,34826451434044,34867087527022,34907742246539,34948412242855,34989097573858,35029799618640,35070516300981,35111245809928,35151992914270,35192753674305,35233534624908,35274325990378,35315136247430,35355959982335,35396796153064,35437652479937,35478518060847,35519403669115,35560305836594,35601222952023,35642152452675,35683100616171,35724063101691,35765040154022,35806035913642,35847043422210,35888068226761,35929107111411,35970165049317,36011232184784,36052316078187,36093415295757,36134528804812,36175665885539,36216808187146,36257971339289,36299151140925,36340340674452,36381553991196,36422772862921,36464012330375,36505264341396,36546533797342,36587819146803,36629117912617,36670432049229,36711760006745,36753104242902,36794463532575,36835843551348,36877236099395,36918638645383,36960055865949,37001491295385,37042941532512,37084412324449,37125892945165,37167389695044,37208903303730,37250433309993,37291971597364,37333527216605,37375096963702,37416683783744,37458287654059,37499903817417,37541539352017,37583186464144,37624848388962,37666530144261,37708221941957,37749927259506,37791655030528,37833394607844,37875144074241,37916912604936,37958698805843,38000499136809,38042311481627,38084138470311,38125981271933,38167840282146,38209711869640,38251603677377,38293505967824,38335425579259,38377361773011,38419307530688,38461280165430,38503252062835,38545247107769,38587253866694,38629279280415,38671315583110,38713368159627,38755437955159,38797524185600,38839623090878,38881733793770,38923861915485,38966004219361,39008165401280,39050337768665,39092525153726,39134727205203,39176948966806,39219178884708,39261428545891,39303691633513,39345964167394,39388258693554,39430565004387,39472891240368,39515222897497,39557573633894,39599939924322,39642323843753,39684713823483,39727125248110,39769559521504,39811998523385,39854452546953,39896920199378,39939403694293,39981911280553,40024419662630,40066951586681,40109492716665,40152051172455,40194626003692,40237214961389,40279815915010,40322435487462,40365065478517,40407712766467,40450375255552,40493053177408,40535742885408,40578448571745,40621172772161,40663905575243,40706655637156,40749425871799,40792199872012,40834995541739,40877801443024,40920626848461,40963467303174,41006313717358,41049186100887,41092069466803,41134966210527,41177872433464,41220799733927,41263741418342,41306700719594,41349666270262,41392648856946,41435649631568,41478665859133,41521695674433,41564742816127,41607794512756,41650864641510,41693954745835,41737057685330,41780172924991,41823309032340,41866446740056,41909609398610,41952785333682,41995969259859,42039176264376,42082388429968,42125622280280,42168869198407,42212131413567,42255409160622,42298696652915,42342002717440,42385317245546,42428654401136,42472000847913,42515370218970,42558742376935,42602127426981,42645541195597,42688958716758,42732398322358,42775848127939,42819310105359,42862784856592,42906279015496,42949782967757,42993307582889,43036845741783,43080393812424,43123955337384,43167536167373,43211134173773,43254739409173,43298359193744,43341996779361,43385646227576,43429315646845,43472996565769,43516689820030,43560400234518,43604124772601,43647860511928,43691610913245,43735376079969,43779158626053,43822952743348,43866763052588,43910584218540,43954420568577,43998272466620,44042137289638,44086017024195,44129911443660,44173821708816,44217747048611,44261688319525,44305638646570,44349600582793,44393586562744,44437585575516,44481593347561,44525617947429,44569646853531,44613704468704,44657768351334,44701848322204,44745944396433,44790049193548,44834174062605,44878311862614,44922464235311,44966628028748,45010815554448,45055005683710,45099211101950,45143436248771,45187669491734,45231919947178,45276184036019,45320463274140,45364753388152,45409062617451,45453381996593,45497720603338,45542067960373,45586432549450,45630812932557,45675203592445,45719609168631,45764031064617,45808460614035,45852904677495,45897371570085,45941852588329,45986343430164,46030847938565,46075363995182,46119899711517,46164442001978,46209002126982,46253580493848,46298171647570,46342770961021,46387391774037,46432025722089,46476669731637,46521326988816,46565999111663,46610689406657,46655391526901,46700111175298,46744835237025,46789578672762,46834341182135,46879108933839,46923894830394,46968692558166,47013507258565,47058338592493,47103177707475,47148026718258,47192898406260,47237784860782,47282677420612,47327593126625,47372512056689,47417453574763,47462412418170,47507378637708,47552357773310,47597351933301,47642360790980,47687382366510,47732418981199,47777472289131,47822535679023,47867614310281,47912705375105,47957813257563,48002935796082,48048068452389,48093216643781,48138379089102,48183548131667,48228739610652,48273943414094,48319160784324,48364387468284,48409634710005,48454894262383,48500167696305,48545452884662,48590758221906,48636071069124,48681397598610,48726737464921,48772096033386,48817462934669,48862844930920,48908245629954,48953652393635,48999078324101,49044520555394,49089970025445,49135433243618,49180911162223,49226408770867,49271911953915,49317432534354,49362966110044,49408516844665,49454074954000,49499649771948,49545239492371,49590844264867,49636463126060,49682094304717,49727737472498,49773390836800,49819065896134,49864749913734,49910447105966,49956157182727,50001884505403,50047626223044,50093384240554,50139147308362,50184930733657,50230727528089,50276531312837,50322354045390,50368187034084,50414037475105,50459907496866,50505784536641,50551673507893,50597577331506,50643493792655,50689423652506,50735371657889,50781327994313,50827297320764,50873288179910,50919286079992,50965299692185,51011323289600,51057362364422,51103417101880,51149488051345,51195566950068,51241657210065,51287771619743,51333893220153,51380025568327,51426172027861,51472338628626,51518513903812,51564702116836,51610907060910,51657124256512,51703352334079,51749591637146,51795851248034,51842119934808,51888404894815,51934698361883,51981015703718,52027337194912,52073675375214,52120028059505,52166395334838,52212776255421,52259166164963,52305566086786,52351986125485,52398421780337,52444871397843,52491326947295,52537798572344,52584284792946,52630780611795,52677296159637,52723823554975,52770362554124,52816915688672,52863486165318,52910063525952,52956660398955,53003270915740,53049885421587,53096520748579,53143165295818,53189828698131,53236502193670,53283192472550,53329888825929,53376603265548,53423331842947,53470074683814,53516833598887,53563595273806,53610375898304,53657176510066,53703979410809,53750798422204,53797634980912,53844481700098,53891348590609,53938215381613,53985102484564,54032004413257,54078915246869,54125843097757,54172790851792,54219746146336,54266712774069,54313692089526,54360689372301,54407695796348,54454720064803,54501748396408,54548796345606,54595859835296,54642932193423,54690017771976,54737123162730,54784230373453,54831357552612,54878500563088,54925656978654,54972824696372,55020002269149,55067196701737,55114401022071,55161625160865,55208855718449,55256100908726,55303359906613,55350634676897,55397922642398,55445224175881,55492528923114,55539856090850,55587195553579,55634540798896,55681912909487,55729293699624,55776682095135,55824088445181,55871504936422,55918934994053,55966381177551,56013838214689,56061307642630,56108791857405,56156286819291,56203797805912,56251320370635,56298853408631,56346403445002,56393962774086,56441543360285,56489131450492,56536735587032,56584352795756,56631981321499,56679619789001,56727274860770,56774938996968,56822621993031,56870311923938,56918021823825,56965739833948,57013473676276,57061219529094,57108978084058,57156753953513,57204536013754,57252333825665,57300146487918,57347968123615,57395805429663,57443651607854,57491517495776,57539393997919,57587287694902,57635186436818,57683104479904,57731027129353,57778975002421,57826925146218,57874896201033,57922870308304,57970863851974,58018868778771,58066891973849,58114927472735,58162969498922,58211028054638,58259099378389,58307191315638,58355287416173,58403397274843,58451523745819,58499659915110,58547806401725,58595966746799,58644139556435,58692327034587,58740532356845,58788742558143,58836965591573,58885205830121,58933465388073,58981729204279,59030011961871,59078297350384,59126602671615,59174923139535,59223255452083,59271596306527,59319948243600,59368321731985,59416707119068,59465099464056,59513504848127,59561927314129,59610358874688,59658809413822,59707268537261,59755740493926,59804220806279,59852721425902,59901232432552,59949758739394,59998291472449,60046844799186,60095401321935,60143978119939,60192563442774,60241166397728,60289780361056,60338403060254,60387045192525,60435699988930,60484364218684,60533038734386,60581730355419,60630430111399,60679150185580,60727876638541,60776618741604,60825375068370,60874137952464,60922918843076,60971711886368,61020517549734,61069337128193,61118168378460,61167009075938,61215867478266,61264737907475,61313612742930,61362508137174,61411427034715,61460343541798,61509273842058,61558223780833,61607181694463,61656148139709,61705132874098,61754131438285,61803139731748,61852160756377,61901195506191,61950237722870,61999302202602,62048376237905,62097461100104,62146558753987,62195667878520,62244795075338,62293933924961,62343074804720,62392239051552,62441414594621,62490599812273,62539806305259,62589017642386,62638237886298,62687476701584,62736728030452,62785987507566,62835264312013,62884557480391,62933859495957,62983171154933,63032494854960,63081832084674,63131184209114,63180551363861,63229923331385,63279318535850,63328721239946,63378132274983,63427561951944,63477006191801,63526449352671,63575915639352,63625400756274,63674885422896,63724390758634,63773903571343,63823432504907,63872977204465,63922529470997,63972092238978,64021674860823,64071264091829,64120865419900,64170486590318,64220112116630,64269751389834,64319405364185,64369066836406,64418757450752,64468446866198,64518148304584,64567860161891,64617590368121,64667332426499,64717079604762,64766850002053,64816625532208,64866415696875,64916225790752,64966045533675,65015872789616,65065708863648,65115566258318,65165427372157,65215315076301,65265203021922,65315102970332,65365017254454,65414956981963,65464892484366,65514849430798,65564809517592,65614790636657,65664786385762,65714790506693,65764798924604,65814834453113,65864872046294,65914920397714,65964993288749,66015068604788,66065162578814,66115263969200,66165376617909,66215508713681,66265649722360,66315797860325,66365964011281,66416144131107,66466333252134,66516536462473,66566747461196,66616972727472,66667215278539,66717464236176,66767730012957,66818007944744,66868296792052,66918602318150,66968914868838,67019243119682,67069580275281,67119925532501,67170286423967,67220666137846,67271053866027,67321454034561,67371866022623,67422293897759,67472731562150,67523179444477,67573642821008,67624121568906,67674604854658,67725103479192,67775611790590,67826139004484,67876676696845,67927220650190,67977787983361,68028356585040,68078940388743,68129541739942,68180152267027,68230771107916,68281398043760,68332050771454,68382711367956,68433383502323,68484068293520,68534761490096,68585473339109,68636194098701,68686928575621,68737677192312,68788432383721,68839196727881,68889981082679,68940768130608,68991577631359,69042398348449,69093220083553,69144066704416,69194921841782,69245796212100,69296671082758,69347561133462,69398468399132,69449381069908,69500313664413,69551251702618,69602201623358,69653167876190,69704139422084,69755132925761,69806140473936,69857157676972,69908180414469,69959219359090,70010270127605,70061334184178,70112408095372,70163491798872,70214595722233,70265708439086,70316829985039,70367963733991,70419112974109,70470273965776,70521441823215,70572627199923,70623828283307,70675031324581,70726256036648,70777490740453,70828731527646,70879986233683,70931256007857,70982534558236,71033831769150,71085134917115,71136452599123,71187789776805,71239128771037,71290480784847,71341856105940,71393226728297,71444613998245,71496018962678,71547432918243,71598859310799,71650294910668,71701742637855,71753211610271,71804687322012,71856172189843,71907670086221,71959182505889,72010704344762,72062249342078,72113793322948,72165349463475,72216923847961,72268507464746,72320104307311,72371715240593,72423326094153,72474957738563,72526604452236,72578258259468,72629929142352,72681605131465,72733300381565,72785002155240,72836717414589,72888453705748,72940190847524,72991944279659,73043703008011,73095479600069,73147268743333,73199071566412,73250888357085,73302712862853,73354544716789,73406391725986,73458252853878,73510120650967,73562006289514,73613907266776,73665808596898,73717730015732,73769662155944,73821609999589,73873559021381,73925520768931,73977505472103,74029494152316,74081499099354,74133510826999,74185544947045,74237585869806,74289634535456,74341700977873,74393776317548,74445865421447,74497963257213,74550070475521,74602195178578,74654325959046,74706475127225,74758642484062,74810805491078,74862986217560,74915182267177,74967390789449,75019609098882,75071838800912,75124077095975,75176334864186,75228599466863,75280871175290,75333158003926,75385462034173,75437779066508,75490101717337,75542439893149,75594786927037,75647149813089,75699526509615,75751908765319,75804307251513,75856712636424,75909135206623,75961560681561,76014008736022,76066466734751,76118937523249,76171414771155,76223901264958,76276402705765,76328925332690,76381446369573,76433984714354,76486535970428,76539091998256,76591666848576,76644254067644,76696853811735,76749460363649,76802079960715,76854713806316,76907361530314,76960015826474,77012682578601,77065364252238,77118053066497,77170760326464,77223475195071,77276200689156,77328938569237,77381695761573,77434460508323,77487230521679,77540018612645,77592813080638,77645622650116,77698442997965,77751278134462,77804119489571,77856978999750,77909842589916,77962726500787,78015616998408,78068524196990,78121437465460,78174362898786,78227308456620,78280247427661,78333209449156,78386187890395,78439169271421,78492175532838,78545182014572,78598210997578,78651233926414,78704277128371,78757334774989,78810408402468,78863483408524,78916567716067,78969677230146,79022786466273,79075914298833,79129053808809,79182197885160,79235365594356,79288534416731,79341716377355,79394915470853,79448124750257,79501343246708,79554573325597,79607814799478,79661064321119,79714335207006,79767607903448,79820899706943,79874200388018,79927518438852,79980835983413,80034166943987,80087516331413,80140874440041,80194245683221,80247630569926,80301021845802,80354426359931,80407842152114,80461276939019,80514717133251,80568169699083,80621634351275,80675109855732,80728596197916,80782092840351,80835601364924,80889123191419,80942659898687,80996203128687,81049754150420,81103327206719,81156907979711,81210503518728,81264099995800,81317715361462,81371338370109,81424976544370,81478630552084,81532283169388,81585954562317,81639638536976,81693341011763,81747047033470,81800757456347,81854494753773,81908236502689,81961987872641,82015747414885,82069528804973,82123314967700,82177121110735,82230920769679,82284742579803,82338577039071,82392420595112,82446279521928,82500148742463,82554026880792,82607919265972,82661819999976,82715733857413,82769656151120,82823601061357,82877548170041,82931506092556,82985479526109,83039458676798,83093452927136,83147462751132,83201478943682,83255507881903,83309546170748,83363598211210,83417656222998,83471735939031,83525816535460,83579913017594,83634027974470,83688149944540,83742277936474,83796425974022,83850578671618,83904749177201,83958925972990,84013117326315,84067311679464,84121529523985,84175754777190,84229984627735,84284235284703,84338493896844,84392761047532,84447036279974,84501332602424,84555632100296,84609953499043,84664277524961,84718619057521,84772961888674,84827320613435,84881699706809,84936076039376,84990473592417,85044882843882,85099300595256,85153733107977,85208167598584,85262626955284,85317092932715,85371565614092,85426048781622,85480542976542,85535055710163,85589574716202,85644106353696,85698650302455,85753204986340,85807759152056,85862347890253,85916931385550,85971530781977,86026148154591,86080764145040,86135398353499,86190042679932,86244698656901,86299366669833,86354041428239,86408739491349,86463439638224,86518152199178,86572876721240,86627614703964,86682365356934,86737117185362,86791885524287,86846667889308,86901461587989,86956264037316,87011075418243,87065910127353,87120745604816,87175591380863,87230457923384,87285325781286,87340205935999,87395107101907,87450004612337,87504917931481,87559855102839,87614794678498,87669743369928,87724699363199,87779672583469,87834660258225,87889656669379,87944666767519,87999683457263,88054711516078,88109749666648,88164801873607,88219862667207,88274938377057,88330029032024,88385120406477,88440232250671,88495344840775,88550482232601,88605620811876,88660771423866,88715937054455,88771112857346,88826292447982,88881495930169,88936705747593,88991921682573,89047149206932,89102395820139,89157653816227,89212914514407,89268192474130,89323479930960,89378778301696,89434085334499,89489404518505,89544739959304,89600090314751,89655439931668,89710805425075,89766180049845,89821570922089,89876973933100,89932381667526,89987797424414,90043236554867,90098681977779,90154135184186,90209601591046,90265078707222,90320569129608,90376063667496,90431582229692,90487100547529,90542629596739,90598175134940,90653736080031,90709306151109,90764883534757,90820463343488,90876065558239,90931680623805,90987305908950,91042932404422,91098580824386,91154228674390,91209897847652,91265575311936,91321268614309,91376971100720,91432681460683,91488404966386,91544135881658,91599880798368,91655640558713,91711408793956,91767182325550,91822966872540,91878769834886,91934578265055,91990403230005,92046244248221,92102078839197,92157936692701,92213802063808,92269677038977,92325567703880,92381467064248,92437376392431,92493300996209,92549234764161,92605172141125,92661133979195,92717101844285,92773075727268,92829062289256,92885059020286,92941073494841,92997099489558,93053129329446,93109173155226,93165230615118,93221298004996,93277362903988,93333455336194,93389551995686,93445670748876,93501786093744,93557924350234,93614059559393,93670210391423,93726373976611,93782556892968,93838744786017,93894938998412,93951154125535,94007367907848,94063600240036,94119845427910,94176102267531,94232366854695,94288634789339,94344927398823,94401221320921,94457534353316,94513849831508,94570180516973,94626524903410,94682870615213,94739235802911,94795607687073,94851988838667,94908384132194,94964792946628,95021214559788,95077644156113,95134081976558,95190534676178,95246996486986,95303463553289,95359947595708,95416443603426,95472946079142,95529467377684,95585990914682,95642531443600,95699080661569,95755640698614,95812217898623,95868791100917,95925384312687,95981992968338,96038605364803,96095231695742,96151875242827,96208515293135,96265170918391,96321847585326,96378525114453,96435220627625,96491922318676,96548640005485,96605356320220,96662095589311,96718835049625,96775591712023,96832355599677,96889131534994,96945923385607,97002726554734,97059535719572,97116353476518,97173189038240,97230038315027,97286891758259,97343757276152,97400629919058,97457513366565,97514417731207,97571329725542,97628242409697,97685178158342,97742119794806,97799077394750,97856032668257,97913006640970,97969988399137,98026987533324,98083994918824,98141013910819,98198038135217,98255078295892,98312122990921,98369188081262,98426268098565,98483344298351,98540432960343,98597545405056,98654656592909,98711779440584,98768910326274,98826070012807,98883222112363,98940390552383,98997576173802,99054766903767,99111964722458,99169182027646,99226401499017,99283633252036,99340869155346,99398127663284,99455397108049,99512674902119,99569966209176,99627260521615,99684571470300,99741897452585,99799224742989,99856563985767,99913916481296,99971282386144,100028651582564,100086038666743,100143430806386,100200842628874,100258262524960,100315692047288,100373127348365,100430573005841,100488036844962,100545511041238,100602991810184,100660483017115,100717987008598,100775496208960,100833019561914,100890554629989,100948106798587,101005664055741,101063225276980,101120803416491,101178389326089,101235991543636,101293606462336,101351225664983,101408854169126,101466496049461,101524155699433,101581815274338,101639494912810,101697176971661,101754867623065,101812576106850,101870304244768,101928028490922,101985769169146,102043515669721,102101280402055,102159050753388,102216839136837,102274626224269,102332422138227,102390237177599,102448062778880,102505896858691,102563746299233,102621597801043,102679472772798,102737348563416,102795235181843,102853142083106,102911043168282,102968959854900,103026893392527,103084844219640,103142799611097,103200754794880,103258741132884,103316721206287,103374710547173,103432713403571,103490736044461,103548762056365,103606794222720,103664849855248,103722909897748,103780976578748,103839061775087,103897149494939,103955250957019,104013362763607,104071487779295,104129627870298,104187769350207,104245924925603,104304088248055,104362257242436,104420450285285,104478644062419,104536852963536,104595079956880,104653300541536,104711543382830,104769795887568,104828061114455,104886322727459,104944610952052,105002899102330,105061209003085,105119516085647,105177837381060,105236172752096,105294516702220,105352874121694,105411237426572,105469623460159,105528010655790,105586409994347,105644815154738,105703230778279,105761659024072,105820103872854,105878553033600,105937019588003,105995487862948,106053977882746,106112465166324,106170971140347,106229487078875,106288017803074,106346555769776,106405101966730,106463653255764,106522230888384,106580794047290,106639383545626,106697986523169,106756596351804,106815217089755,106873853915979,106932487039799,106991137158575,107049805388628,107108474896858,107167158845320,107225847465079,107284551993940,107343263855812,107401986177270,107460733654153,107519485324038,107578241368612,107637008249793,107695789143741,107754575128426,107813380152270,107872182609512,107931003967967,107989831626510,108048664480835,108107517847381,108166379935748,108225257523338,108284143705873,108343029949298,108401932117354,108460850334986,108519779820129,108578710817734,108637660178877,108696613854398,108755578395054,108814560069917,108873547925089,108932543623388,108991553170982,109050569842315,109109602402633,109168640389076,109227698665901,109286756142326,109345826516366,109404904522045,109463999601892,109523101182192,109582206842344,109641335765271,109700472178510,109759613049255,109818765246932,109877932474652,109937112918788,109996296214377,110055499732369,110114708578216,110173922325188,110233151133791,110292391995805,110351639160100,110410903478314,110470172224596,110529445465957,110588734244726,110648031645970,110707342053351,110766665863228,110825998824534,110885341237311,110944695829475,111004060667996,111063431872708,111122814129047,111182213737806,111241611083095,111301030645257,111360461152197,111419895787632,111479344796818,111538791957901,111598264752309,111657740456777,111717222537296,111776719161965,111836231929624,111895757417974,111955287188967,112014821229653,112074372900386,112133936788944,112193504362066,112253086485971,112312679486609,112372281057758,112431890158432,112491516809005,112551139604000,112610789316151,112670434406107,112730099768375,112789773557455,112849455852858,112909157176219,112968864039102,113028576425052,113088304535079,113148038123255,113207780128866,113267543604178,113327316595203,113387094631907,113446874833573,113506669157396,113566477352423,113626294610575,113686128525873,113745969200173,113805818834048,113865681066270,113925548957232,113985424241798,114045320596269,114105224931677,114165135635775,114225047224606,114284992176104,114344921020613,114404879981797,114464841653747,114524807687413,114584793756995,114644788701293,114704797613035,114764803967438,114824826493433,114884863785511,114944916573586,115004965515857,115065040625430,115125107880099,115185200671609,115245285776285,115305395176547,115365513435561,115425638417528,115485777042300,115545923637924,115606086314169,115666258542647,115726440876607,115786624182080,115846820406107,115907028890766,115967250560232,116027477466618,116087720408398,116147969975243,116208228636826,116268496763964,116328780283692,116389075239365,116449377775599,116509687896028,116570011703116,116630334146216,116690680483619,116751037815977,116811399866279,116871773910746,116932156593880,116992545399797,117052953078219,117113367051962,117173785432269,117234220136370,117294662236356,117355117979545,117415579301943,117476056837319,117536548646272,117597042599643,117657542094355,117718062411623,117778584347807,117839114390552,117899664481273,117960215654749,118020784404565,118081362952821,118141953645881,118202543555103,118263154951093,118323774799806,118384400832482,118445038939320,118505673867076,118566344704990,118627011719189,118687686964599,118748375369138,118809082265623,118869789564613,118930503054578,118991233561033,119051980911678,119112728373974,119173482066428,119234250675536,119295027463915,119355813465820,119416619321929,119477428273070,119538248662986,119599083144924,119659922043961,119720776832283,119781640944714,119842504526830,119903385510141,119964280975666,120025187466817,120086090334429,120147009914764,120207944733964,120268889186557,120329845648790,120390802357675,120451770807927,120512754922607,120573742196930,120634749629661,120695760221768,120756778838529,120817818565982,120878859587368,120939911686163,121000977382315,121062049613088,121123128441521,121184226012514,121245320948032,121306440111127,121367568538611,121428697889224,121489839159445,121550997320354,121612164529645,121673329755460,121734517316866,121795705846826,121856910465739,121918124411697,121979346728680,122040587686578,122101833964584,122163079891305,122224351499828,122285623875698,122346911874300,122408201813043,122469504050732,122530817172895,122592150206052,122653481952791,122714826215606,122776184232460,122837548772912,122898926633869,122960310558673,123021697192061,123083103402874,123144513510453,123205945939997,123267384693995,123328833730409,123390282667503,123451746175730,123513224554376,123574705162982,123636198259632,123697705961597,123759223345436,123820748903791,123882283845383,123943832277233,124005386657150,124066949699924,124128525435740,124190111497665,124251709095807,124313313817049,124374936346401,124436564755362,124498185591897,124559837041199,124621485390438,124683155733340,124744827247677,124806508775253,124868203753841,124929912276132,124991623223656,125053351549411,125115089803444,125176833285162,125238594869912,125300350125790,125362117977642,125423909039944,125485705553171,125547507352213,125609323935553,125671151126030,125732980303234,125794830935756,125856676825039,125918546543277,125980426675074,126042314723040,126104201727179,126166104761176,126228016081771,126289941760012,126351880381416,126413824401957,126475772771653,126537736757028,126599707493431,126661693650713,126723687366398,126785692812559,126847701457101,126909731378029,126971759058189,127033802511413,127095862773346,127157925465632,127219991248775,127282079886060,127344173496487,127406273531317,127468390947283,127530508729812,127592648369438,127654788309380,127716931709848,127779103277848,127841275508615,127903462175100,127965651139320,128027850581444,128090055688890,128152282014894,128214519503971,128276753958888,128338997018436,128401255976664,128463530652479,128525812592791,128588103093333,128650407660410,128712716286991,128775039813042,128837371266995,128899714681145,128962064216229,129024421731363,129086790636651,129149169774173,129211558719212,129273955985199,129336363212481,129398784232449,129461222267391,129523649669283,129586104590348,129648558021979,129711034023749,129773508199835,129836000953410,129898496410537,129960999937003,130023522240707,130086047720159,130148585198984,130211124981090,130273684420205,130336265615843,130398827458952,130461418228841,130524016576459,130586617223748,130649235101307,130711862852881,130774505231364,130837144422793,130899795085980,130962459293280,131025137767308,131087824121701,131150529018112,131213224704449,131275939060301,131338668485574,131401396425230,131464131165502,131526886605170,131589651876827,131652428499116,131715212591222,131778005224104,131840791143712,131903606302298,131966435577965,132029263540053,132092111591972,132154956492112,132217819561069,132280689368177,132343571813128,132406462586332,132469362172818,132532279015389,132595190523516,132658117176965,132721060839467,132784014251850,132846978277127,132909945999381,132972924944167,133035909628880,133098907486188,133161910416327,133224932101460,133287956040483,133350996535516,133414043231307,133477096678885,133540168639009,133603234811187,133666326764115,133729424434443,133792526366552,133855637998353,133918768710221,133981892926423,134045044202099,134108198598631,134171362120871,134234530868794,134297723615211,134360909443084,134424114677115,134487332313078,134550551506142,134613780911361,134677024242901,134740275035051,134803533765900,134866804801545,134930075265205,134993370029991,135056666865509,135119974612276,135183296894100,135246628041491,135309961661597,135373315085606,135436665954991,135500038953571,135563419355303,135626798909429,135690199624817,135753612114159,135817030619431,135880452349539,135943891681910,136007327619309,136070787614895,136134250245065,136197724488968,136261219071557,136324701178410,136388202804889,136451721767021,136515242642097,136578778202578,136642319988366,136705864929871,136769428329708,136833001688462,136896580100357,136960167121803,137023772287326,137087376223589,137151007802674,137214637755781,137278272487040,137341924969115,137405574439747,137469239428574,137532921073084,137596604827699,137660305648036,137724001525886,137787723785098,137851453077008,137915181974573,137978932268689,138042684274395,138106448322768,138170225576357,138234008092685,138297793306289,138361601426118,138425414880347,138489232888655,138553067128017,138616909705619,138680763588418,138744619312469,138808488881815,138872367085654,138936256931139,139000154123966,139064067497731,139127975331352,139191915851196,139255857272757,139319797157354,139383758368685,139447724445930,139511702641120,139575677979639,139639678794554,139703675733454,139767700144812,139831719312608,139895749746256,139959794974317,140023845095902,140087901771427,140151981644678,140216060163833,140280158041180,140344247536514,140408355624771,140472480512248,140536617214890,140600751315328,140664901412513,140729068015314,140793230614407,140857408686297,140921590321607,140985785588603,141049999884928,141114220809238,141178440693603,141242674526817,141306926250705,141371173922874,141435439994148,141499706493302,141563987988072,141628277942137,141692585557669,141756891981806,141821216533773,141885542820812,141949876883395,142014232123478,142078585481813,142142954432808,142207339945557,142271717844910,142336122293924,142400520779394,142464951570796,142529365128538,142593809379495,142658253094501,142722707058788,142787160219748,142851639063223,142916116924532,142980608103907,143045116238161,143109621237849,143174143632451,143238670749082,143303215463796,143367760377000,143432322363669,143496893183595,143561472345219,143626061093393,143690654130235,143755259292549,143819871944221,143884501678091,143949136104982,144013775602685,144078437728075,144143095479747,144207769721638,144272460469989,144337150530180,144401851520119,144466568741471,144531288700446,144596015417783,144660756587927,144725507335824,144790264881090,144855028841152,144919801236490,144984588259951,145049386906246,145114196982897,145179013776567,145243837836557,145308670459060,145373519034507,145438376154004,145503237322833,145568112501160,145632983345442,145697880323280,145762774254232,145827688091248,145892606952215,145957539608905,146022476824493,146087422725800,146152382475424,146217347879040,146282321123579,146347309207605,146412299066431,146477298203869,146542316523436,146607336711770,146672371041123,146737408343098,146802474418125,146867533330503,146932602219358,146997683918491,147062773327923,147127862896749,147192976320384,147258096073418,147323216500945,147388359702785,147453506286273,147518663955315,147583823023964,147648997981850,147714181407140,147779378912409,147844581361235,147909793708401,147975010922102,148040243944862,148105469727512,148170731994812,148235989562900,148301264423059,148366539568765,148431830915713,148497124261016,148562430661047,148627743555993,148693072078261,148758401146658,148823740721025,148889092734191,148954455302974,149019826921491,149085206516984,149150602809917,149216006606048,149281411007665,149346836938477,149412259162038,149477693632179,149543141295927,149608604010927,149674064824304,149739544265153,149805026137809,149870515855996,149936025013700,150001530186802,150067051510926,150132581935385,150198120639098,150263682173616,150329242902304,150394802494063,150460378253767,150525966979787,150591562387879,150657172638090,150722785529932,150788409386300,150854036095528,150919696558041,150985340344126,151050998188433,151116670406876,151182350683599,151248043945799,151313736729556,151379449476052,151445166682798,151510897347931,151576633055927,151642383335662,151708147703283,151773909622735,151839679652933,151905467532343,151971258467059,152037058721593,152102866831913,152168695834060,152234532147532,152300359027774,152366207142460,152432062860019,152497929767235,152563806246617,152629689615192,152695586975343,152761492098101,152827415138541,152893332582108,152959266431364,153025207284226,153091157312100,153157115337085,153223087156997,153289072948896,153355056437702,153421054801211,153487065029030,153553077848015,153619102537000,153685137242356,153751180307976,153817241959079,153883305158358,153949379825545,154015458494036,154081542404467,154147644010736,154213747097901,154279875228530,154346002041132,154412141091629,154478283374897,154544440458453,154610603513081,154676770719213,154742953534875,154809161801594,154875350317256,154941568726668,155007783980856,155074010244908,155140253973582,155206505854560,155272761326104,155339020103090,155405299836459,155471578947904,155537883500925,155604185560141,155670498625944,155736824348650,155803149340012,155869502544543,155935853821163,156002209592646,156068576058631,156134954889251,156201337188140,156267730444942,156334142492720,156400559418868,156466980074016,156533417100506,156599852797420,156666309168921,156732763490922,156799229532161,156865712617181,156932201626896,156998697120413,157065210476806,157131720889869,157198245193109,157264784180278,157331336829126,157397883783053,157464445554553,157531010564522,157597587965052,157664173082279,157730779318893,157797390940225,157864004615730,157930636771215,157997272985974,158063912360663,158130565128469,158197224869198,158263903102164,158330583655814,158397268469291,158463971505210,158530681464121,158597413346646,158664136158388,158730869806773,158797614177411,158864369128184,158931140580250,158997908717194,159064692472228,159131491615043,159198294442900,159265103650715,159331919149360,159398755484514,159465582517530,159532431710144,159599291232462,159666153320448,159733033457417,159799914229465,159866813506484,159933706355488,160000621862379,160067543529941,160134475143250,160201411997391,160268357604247,160335317009038,160402281402206,160469255273749,160536241704060,160603231240994,160670234830987,160737257501724,160804270559101,160871296521219,160938346644033,161005389588943,161072443837427,161139511544880,161206587184275,161273675626401,161340770500808,161407873961649,161474983017376,161542105059855,161609233262800,161676374358365,161743517831810,161810689589429,161877857198169,161945024717564,162012216250135,162079415840497,162146612939661,162213822701465,162281052896152,162348279761077,162415520815695,162482768226601,162550018802647,162617286623305,162684567167028,162751856077985,162819152135630,162886450452156,162953767769077,163021087436740,163088422026019,163155761488346,163223111848669,163290471877837,163357835627047,163425218627460,163492594690921,163559997251003,163627400695016,163694811606771,163762236463571,163829671448151,163897111769854,163964558492699,164032026688550,164099488885684,164166966288731,164234436733611,164301937585531,164369441446887,164436970079881,164504481526854,164572017203439,164639552495302,164707102309522,164774652546646,164842223754682,164909800064493,164977383355357,165044983438407,165112581905882,165180197131697,165247819449580,165315466246051,165383095297249,165450734741695,165518394332098,165586065429070,165653737540818,165721414511896,165789105166438,165856829336812,165924538468412,165992254889785,166059980948311,166127715309196,166195469413804,166263236773974,166331001170812,166398778311269,166466566881792,166534349199541,166602145664989,166669968656639,166737791209273,166805624463027,166873455609462,166941303861837,167009168819927,167077035015773,167144907860748,167212795377581,167280684684619,167348578463596,167416489621939,167484418720150,167552343557977,167620290762738,167688240386169,167756196731458,167824157233772,167892134955546,167960114959494,168028103669785,168096101122744,168164116134317,168232129673209,168300155544798,168368201532224,168436249537686,168504295099688,168572368204357,168640446060503,168708533319412,168776617535949,168844723984141,168912828898882,168980939285543,169049066088722,169117204908285,169185358222986,169253516581627,169321677183965,169389850251596,169458024922813,169526215481414,169594412326907,169662626489068,169730853519917,169799072534416,169867304859126,169935553139935,170003803941835,170072068045707,170140335846025,170208613583333,170276914087968,170345208139496,170413504977676,170481820335357,170550155720061,170618487419571,170686830550200,170755180786464,170823536585622,170891904211537,170960285061501,171028673015385,171097065946002,171165475030695,171233888233604,171302311206492,171370745484562,171439190261651,171507634997067,171576086422383,171644556513809,171713029666298,171781524090825,171850014434657,171918514221024,171987030120403,172055556225681,172124088595988,172192625608449,172261175373201,172329732808276,172398304188597,172466875127999,172535461265836,172604050496696,172672647634378,172741258441892,172809887504112,172878509250768,172947154279635,173015801082684,173084462000507,173153123632836,173221789908102,173290467712464,173359168097456,173427865715581,173496565565208,173565281737982,173634012003705,173702753382531,173771495858517,173840257021119,173909014978729,173977788122041,174046564923852,174115354717980,174184151287749,174252959037187,174321776536962,174390600746358,174459437741638,174528282879799,174597123414269,174665988889360,174734849002298,174803733257033,174872617924822,174941510375335,175010423004958,175079335072736,175148271431608,175217203256261,175286132612606,175355081694022,175424037945142,175493004520137,175561983907474,175630964049320,175699953582993,175768961938431,175837964948197,175906993912537,175976010979588,176045051509267,176114096088829,176183153420000,176252226155512,176321291580960,176390380032934,176459471668847,176528566583411,176597670722397,176666790282542,176735917768312,176805053398852,176874203931050,176943354086689,177012517245312,177081675418945,177150870925422,177220045338702,177289249344861,177358462414705,177427676851955,177496895329539,177566126254709,177635371773244,177704626616843,177773884811876,177843155316876,177912421230978,177981716998872,178051005800671,178120323631180,178189634472726,178258958163444,178328278610042,178397611727809,178466953940711,178536314021097,178605678827795,178675053205378,178744433171125,178813832927833,178883239001696,178952637209992,179022055558501,179091482283678,179160918333459,179230364508928,179299817189128,179369273930600,179438756288135,179508226108102,179577710616031,179647217208970,179716725521852,179786239394752,179855767311944,179925302420907,179994833928835,180064378240576,180133949736513,180203511583445,180273090913695,180342674942860,180412272712344,180481872236902,180551487687073,180621104677108,180690739588960,180760373734865,180830018406051,180899675620660,180969334849329,181039015404970,181108691774727,181178382809818,181248077667650,181317788754801,181387510649702,181457237195337,181526969576027,181596716582252,181666464257346,181736226868096,181805999011317,181875779659059,181945562184150,182015357480964,182085161993937,182154974819057,182224798337611,182294623294944,182364463553492,182434308609752,182504177568440,182574045232444,182643914266650,182713803745574,182783688186742,182853596171752,182923496242962,182993424823946,183063343703897,183133284584576,183203238333895,183273186620593,183343144329050,183413124368835,183483103426285,183553092788580,183623079861285,183693089130036,183763100274715,183833127071022,183903159088359,183973200675585,184043252118468,184113303256517,184183378937235,184253452939168,184323534215608,184393631220279,184463730930806,184533830258651,184603945375334,184674090463069,184744231065105,184814373644352,184884524789316,184954690541872,185024861135830,185095041511942,185165224641201,185235418522952,185305622026765,185375847986098,185446068024905,185516300349193,185586532751073,185656786832028,185727043319555,185797314699789,185867588268554,185937873508073,186008167135938,186078469657570,186148784107205,186219101743687,186289428683783,186359761879394,186430111889062,186500469376942,186570829692174,186641201829208,186711579219726,186781963751666,186852363576339,186922772637327,186993188587894,187063617310045,187134035936938,187204480719090,187274935847102,187345391076809,187415867522987,187486340738288,187556830533960,187627322996302,187697825629077,187768331032738,187838854298922,187909383562079,187979913630779,188050463771338,188121009745300,188191565610729,188262148322511,188332730224654,188403309776900,188473913013002,188544517517311,188615139717280,188685753195585,188756391274605,188827033577001,188897672169203,188968334475341,189039002466115,189109680949017,189180357437360,189251049199869,189321754518363,189392473560333,189463186271361,189533910782139,189604641303154,189675381390008,189746135351106,189816889497537,189887667935606,189958445667170,190029241063193,190100024657842,190170833232505,190241643941544,190312476740487,190383309024156,190454141884883,190524989986055,190595846074122,190666716757832,190737588334527,190808468780767};
ll p[maxn],a[maxn];
ll n,m,k;

void fi(ll x)
{
    ll ans=sum[x/maxn];
    ll l=x/maxn*maxn+1,r=x;
    for(ll i=1;i*i<=r;i++)
    {
        for(int j=max(i,(l+i-1)/i)*i-l;j<r-l+1;j+=i)
            a[j]=i;
    }
    for(int i=0;i<r-l+1;i++)
        ans+=a[i];
    printf("%lld\n",ans);
}

int main(void)
{
    int tt;
    tt=read();
    while(tt--)
    {
        n=read(),m=read(),k=read();
        for(int i=1;i<=m;i++) p[i]=read();

        bool flag=true;
        for(int i=m;i>=1;i--)
        {
            if(p[i]==1)
            {
                flag=false;
                break;
            }
            else k+=(k-1)/(p[i]-1);
        }
        if(!flag||k>n) printf("-1\n");
        else fi(k);
    }
    return 0;
}

©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页