QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#726413#8962. Immensely Long ExpressionsZhaoZiLongAC ✓515ms3864kbC++202.4kb2024-11-09 00:06:172024-11-09 00:06:18

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3556kb

input:

7
1
3
5
7
9
998244353
111111111224317155

output:

499122181
137441435
101569571
823750769
719161256
368379914
253718992

result:

ok 7 numbers

Test #2:

score: 0
Accepted
time: 270ms
memory: 3684kb

input:

20000
1996459553
1996329813
1996308541
1996307445
1996394299
1996300053
1996479135
1996484391
1996416899
1996331629
1996427225
1996430281
1996411691
1996315567
1996368671
1996296177
1996485805
1996308083
1996334567
1996471543
1996390267
1996300047
1996429993
1996290543
1996425613
1996420569
19964113...

output:

380868596
460899841
87302211
366328987
643249426
119298341
41982581
950231010
185556224
106562434
668717752
834575321
594045336
60814240
986128114
701244094
945105011
806773358
624806080
904418898
859617414
638324361
419499966
629824824
758909121
340726009
882398919
815932496
524561112
379269935
448...

result:

ok 20000 numbers

Test #3:

score: 0
Accepted
time: 481ms
memory: 3700kb

input:

20000
999999998282101897
999999998282111563
999999998282126855
999999998282046895
999999998282035251
999999998282043811
999999998281992249
999999998281991937
999999998282029603
999999998281980351
999999998281994125
999999998282082919
999999998282071023
999999998282124571
999999998282039447
999999998...

output:

940710737
254033284
483241288
665350022
489783075
801189756
487275103
372721376
273378651
477942215
203156591
684662005
472634791
377543508
95831578
597693742
399776654
99382980
686456185
152399192
103048473
579002377
408607307
980035925
317709080
209220389
300705121
248451489
470207106
701232062
38...

result:

ok 20000 numbers

Test #4:

score: 0
Accepted
time: 265ms
memory: 3808kb

input:

20000
1995938143
1995555585
1996069991
1996090615
1996344619
1996087283
1996452615
1995596607
1995970989
1995662007
1995914857
1995541907
1995581597
1996144609
1996228035
1996339657
1996328751
1996164359
1995604235
1996181045
1996418267
1995846209
1995811321
1996299249
1996139605
1995511203
19963190...

output:

616836829
782733254
42249069
61682315
398744762
500712192
305209631
428279868
342234330
185142718
464028100
729991661
388066327
417429090
616900457
484795446
489725920
962881653
662190759
532308992
544538253
818572705
837400492
445741222
135820706
682874131
306297778
514936069
260838872
941013905
89...

result:

ok 20000 numbers

Test #5:

score: 0
Accepted
time: 474ms
memory: 3656kb

input:

20000
999999998281982367
999999998282118181
999999998282107231
999999998281976697
999999998281268499
999999998281530193
999999998282121665
999999998281977889
999999998282061959
999999998281513521
999999998282074973
999999998282091877
999999998281595409
999999998282045239
999999998282157515
999999998...

output:

826575635
797950010
464733659
155391006
832133965
192853362
253607442
677026086
734637134
512186620
707105754
844995041
778250647
951931359
811242031
507150001
689504643
716239581
325325074
997591693
872962491
17609374
470777247
33755439
67858162
113337203
148847520
575327338
21238564
558694841
4757...

result:

ok 20000 numbers

Test #6:

score: 0
Accepted
time: 515ms
memory: 3692kb

input:

20000
651022701120454653
918672611662102525
850573859370303485
786961796178116605
730167650071609341
465216976285859837
365783647233507325
743202441318629373
594721645797572605
909039106451832829
460743669650030589
796450186606936061
51446465263828989
638152200928886781
386591200246759421
2514258084...

output:

94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
946...

result:

ok 20000 numbers

Test #7:

score: 0
Accepted
time: 510ms
memory: 3788kb

input:

20000
945253101604962301
311136976285728765
661864129912373245
648741435264204797
284414789550079997
152727039500091389
858735748763877373
392837608465498109
629745464157143037
612449089908375549
75738166581002237
299448345498222589
924038690148188157
717901514961584125
398770258501959677
3732383883...

output:

94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
94688870
946...

result:

ok 20000 numbers

Test #8:

score: 0
Accepted
time: 501ms
memory: 3700kb

input:

20000
999305961997495553
999328220395052673
999192860999926657
999930020301892481
999578344213653377
999224869563323649
999786234543000833
999732900059010177
999099684937438209
999822330682971649
999598667566135041
999449608584087937
999767994927150081
999255232248892801
999325293105979521
999571207...

output:

706570650
68094584
111991975
276912612
84485944
784857519
127916744
391226497
808706829
282926043
365209603
393058805
714692517
529118865
921178338
149141661
957170815
87820924
386030483
145202888
949430053
957293958
182301664
517906485
779129559
100888874
750186966
819022282
231711160
334612430
731...

result:

ok 20000 numbers

Test #9:

score: 0
Accepted
time: 490ms
memory: 3696kb

input:

20000
999681958500114689
999016057145520897
999504655968751233
999651402897718017
999943041727488257
999761268762355073
999969624707483521
999521322417357697
999569262665014657
999069112485847425
999224257925306369
999784612904904065
999966911928079489
999075954957276289
999814893873799297
999336413...

output:

26451335
120882498
263446997
439389466
561227077
905781911
744780890
668084302
406795000
649141327
150592445
191221312
733406139
544331360
54053701
915927530
714130856
56264615
92103220
908982549
514502080
466686445
235454978
258546806
833857211
180475681
339665218
162074275
459102564
476899827
8944...

result:

ok 20000 numbers

Test #10:

score: 0
Accepted
time: 489ms
memory: 3640kb

input:

20000
914128880486600577
934820469873086721
943464681430980225
961811071579852545
947681826700242945
902939774065251073
967995911790318465
900629107369528193
900835325529746689
942728342312968065
971380431984328833
907667038148321793
961984454923104513
921938968182132865
925927463559869569
975028192...

output:

381600655
629188137
258641750
516279986
438629068
195024397
367042447
735294693
728222011
907539879
939760574
528853409
861560655
690083873
631162747
907780427
939068594
560992839
552045524
197794092
336162068
931815698
45646788
851360220
421421068
73595365
103371935
567426346
321791277
852109944
13...

result:

ok 20000 numbers

Test #11:

score: 0
Accepted
time: 490ms
memory: 3856kb

input:

20000
991482158663355905
958441767547072769
906733759318712961
932065092020901633
917462282077034113
937842351826340097
945205854866110593
936793198940002049
980756880654358145
986467567573941377
916840370670404225
919019647487058561
967543386081994241
968056298521297025
944558066275603713
944555925...

output:

874797500
39133593
763705749
599817619
304541418
623510412
166359139
993766611
551428249
309235417
731307053
893650365
553419845
291898558
989476503
111330581
810003124
77019180
219353745
614759914
80812265
175205232
633628815
811188338
11988616
64849035
925128598
907339597
178248301
468673963
11365...

result:

ok 20000 numbers

Test #12:

score: 0
Accepted
time: 470ms
memory: 3628kb

input:

20000
484373234355513217
859817133054391553
580728897537251329
718565607811530369
406515197569565249
877091999548723713
103703315998992065
526118914971018049
317147694478994689
296513902387415617
502298461760195457
285937945712844065
211694119087613953
163093237682304513
209294208686307521
202281364...

output:

230380261
183572160
456870784
764343974
993411293
350375656
44810552
64377055
774307302
279896634
527507195
112450888
130899250
363512731
501703511
631325665
951577516
727858968
202309174
571478087
249530153
841156795
150696163
102585950
625687339
151640545
484209759
337029962
564439998
593270586
46...

result:

ok 20000 numbers

Test #13:

score: 0
Accepted
time: 478ms
memory: 3816kb

input:

20000
231981494591032865
318010209109531585
240043110759748865
271063408663346593
167391142897001857
334489525827081217
868512619026605569
115065207936977681
299165739771012417
298780688696745089
966944260095283073
615287801133884161
115781050216707985
623336915018551809
513851654420356225
343462526...

output:

281541065
738354616
623291930
5438387
250075573
340748790
730299876
18852644
157119656
932580150
761959005
942702801
553355933
671520120
120511776
457000731
359227892
302553679
868101857
656255123
521618889
104077104
312691517
612786090
866193453
209425083
845236787
987508666
173454887
350921773
399...

result:

ok 20000 numbers

Test #14:

score: 0
Accepted
time: 475ms
memory: 3784kb

input:

20000
763144695900913409
897639498662330113
155031199585045473
175410415520299009
281354935124939233
468588089376979009
384130051188188609
762832135768022145
160598236785383425
880486845505362305
199431803237273857
391712218276634945
225656848072775137
443684710706734849
183112085145848001
942300367...

output:

53470433
376059933
335061815
69772484
626650012
890205782
597880691
918059568
819039460
62171083
119058530
968154683
473186457
864038249
666780900
675954522
345155219
896239095
18757651
295085230
531747873
717379952
221815
605126770
64927395
136850021
64953589
282660496
722169903
354141259
154187112...

result:

ok 20000 numbers

Test #15:

score: 0
Accepted
time: 441ms
memory: 3700kb

input:

20000
74786322303530449
69255060432356113
51578883359703521
47309051440647617
62829348351316201
23410037616147121
52921584095806241
12971356804691037
32867042225388753
42619099454951505
39835359194620201
26591144755065349
63521499923216769
70318684270620105
16418891660907893
14949586318038123
140972...

output:

824545266
913066901
560409792
193657761
306883128
232008998
65362979
266440963
155079996
643943715
958238933
929377413
677696340
126559951
952074438
884064444
749269225
624918226
820856993
113098495
596458535
75300325
994924274
933725302
555043164
512598185
838668717
968054757
769208531
865472879
69...

result:

ok 20000 numbers

Test #16:

score: 0
Accepted
time: 449ms
memory: 3784kb

input:

20000
41296097813257777
94888710600572097
12149452658368057
24525074553782817
79231087841783441
58632165675261457
24728589257473269
86318941935398049
20336909134656517
10843522416900323
40830630866359065
14520590421275025
88535408378225953
39875035152304329
11244352088029597
92710872103386193
218757...

output:

91906973
596689355
365154949
595502309
922485571
860597701
548678279
756357908
354790213
332538418
970902610
601199984
335615841
155291749
104330304
399052706
410479766
752175893
126440579
237970646
267293592
744972279
567681913
161691850
102561357
506003895
243523141
896272307
528063878
720136474
2...

result:

ok 20000 numbers

Test #17:

score: 0
Accepted
time: 449ms
memory: 3656kb

input:

20000
13946140337507699
29308461929440017
28862289600186221
10342668843553595
14809520088488881
80579781564211649
19030778320740489
11960380647813671
15057338286362077
14418325767189929
66759746191446369
11802055948023383
95615474471606737
89024167660630161
76077686193105729
44914299715487609
744519...

output:

363374680
314304335
476554623
166594714
282379887
777563098
688471796
907329258
247870017
544450671
299741147
349053744
844015424
706126035
302464376
377240857
565061956
130055351
89469629
472616795
391546348
179626555
547238657
478932142
885011960
838284463
118785735
921909470
289799868
968947161
2...

result:

ok 20000 numbers

Test #18:

score: 0
Accepted
time: 417ms
memory: 3644kb

input:

20000
4722554077785973
9567206663754623
2185910521598665
2348847378410503
1300517828098233
3203716748212301
3945718054531259
1172709934731387
4778486571546091
1198650862305257
3689535162689417
7643964520583949
1410521432575137
1260315668579727
5203854053826627
2370494314797857
1583430757471551
27270...

output:

909861366
630720667
56206113
288510309
372288354
738217874
962350098
218472409
100126411
470032369
295079376
985479884
299304010
732562992
769668878
774017801
982628605
645012754
548217534
978355476
204633839
331472770
407009795
515480830
468071454
457649329
995147695
848132930
551105316
804442206
5...

result:

ok 20000 numbers

Test #19:

score: 0
Accepted
time: 415ms
memory: 3648kb

input:

20000
1366119911758053
8935339607807995
1753486959734027
1860391963490247
5568330494349481
2465496373921323
1557622370243945
1308140706426293
5271317670415661
7065882377169521
5342033323475189
1425940901907731
1527300603462499
8930253418307653
1375837414456481
2768446381787747
1395949600274081
17956...

output:

536890170
82238752
217828289
855828616
985308748
24236561
771660864
804298809
556352243
501107207
669016196
358016064
32827825
748845935
819581286
365478355
41736649
456471494
593629222
336213029
511124651
676018653
428777331
176042096
488992887
524529851
560488266
796807229
756896145
421907432
7319...

result:

ok 20000 numbers

Test #20:

score: 0
Accepted
time: 413ms
memory: 3648kb

input:

20000
2010635370129341
3153128605648407
7154598524403495
6964956246534953
1169478826725811
2529111357012811
9312148925110603
4286513337460813
7807814784206629
1924777976456133
4928597575793235
4399689815233955
5305915188128797
1002928935929839
2983298781065121
9240800284832599
4815164500762703
92536...

output:

844763853
585588443
387799627
928118371
444173757
646278374
402509292
205126955
196775419
301894255
867685284
65724737
563657031
495419098
529681251
368565802
627365632
316590010
966822296
723591225
806169616
920186252
145055523
107466398
893139581
979514485
16148965
655721997
989917383
868703778
76...

result:

ok 20000 numbers

Test #21:

score: 0
Accepted
time: 388ms
memory: 3620kb

input:

20000
212851180976027
185605295969825
138913872230817
569954599443867
128592988474315
572462767180529
388110997786789
919137032807459
244342007284699
934910111540835
625233030526697
236078365970047
875783048949591
234885991428865
235464999258215
182802426600987
123498042936197
223034747598577
234912...

output:

235129364
436287625
25951462
185698752
837705255
196654449
166086592
452453179
251587383
216553611
124983393
164288478
388505071
238672768
967106037
435494776
878055076
900751132
30539671
762524209
667322337
110264148
150677661
411485981
965766562
337490638
103360677
611965044
992235230
846217957
82...

result:

ok 20000 numbers

Test #22:

score: 0
Accepted
time: 387ms
memory: 3584kb

input:

20000
585146761974433
341208014109707
659990295339111
505228773148933
558433240609585
221447141648971
403386357450319
792682273012577
148325922204621
735586323474755
290854947804381
376528510506501
774814987743549
203520365300947
988738264438543
487764536556965
132282955944115
501557765567785
210538...

output:

949474067
385087709
967562155
709006250
510686601
460614087
296789860
252551060
116138766
632185071
600207109
750731741
279508729
479671177
400869315
841207937
539212652
991068723
259606553
828712963
16624788
667891478
518270212
118963914
487817700
69843881
568244542
871756984
502741673
558314186
34...

result:

ok 20000 numbers

Test #23:

score: 0
Accepted
time: 389ms
memory: 3576kb

input:

20000
541866058606381
645527290800459
174779570720239
819648298163705
887602568469099
752644219449145
824176970692721
160497727466405
218960419677643
206077750340065
781435534246159
101165279800675
376711874813493
804918927828643
245949710341639
187150459737367
200789929909153
190065456409235
655394...

output:

37923275
409534237
950337076
77276650
673373231
224569522
808764648
919160021
214999974
837936009
340685151
379244540
215922820
720207840
568022718
383232760
310576021
452469389
607879708
849696213
388776002
750974958
293911097
415463272
430808612
234609257
491418397
509555454
701956654
182582793
87...

result:

ok 20000 numbers

Test #24:

score: 0
Accepted
time: 361ms
memory: 3576kb

input:

20000
46627729002473
23879874678843
14690246588259
20447431529271
67828085763853
17250822733073
51800467307647
36750563814385
57229072897423
18023234980271
49286421438473
29063125039099
12211814502051
36949538708449
29691885341845
15714526686995
11587043032529
32616950234971
31473935262933
915034981...

output:

151895101
55920447
327615071
850615011
670949190
914059829
243671744
485516506
56011519
5513759
396029256
940137218
268600943
722041520
995041714
573808123
255561667
873550545
402347458
766812849
794068140
286283448
860757029
220712507
16116718
354012677
625015154
38627533
546503729
248995819
820032...

result:

ok 20000 numbers

Test #25:

score: 0
Accepted
time: 361ms
memory: 3692kb

input:

20000
34488935398199
65860160503151
10772651481995
18169475999097
11779849151815
20844948414083
40248701056029
14474981397093
43718205927611
90769413032663
42910547406053
99482326789457
12419702906691
11882087351037
15245145403189
50746809492817
56910036353963
17814108311745
33732381978523
154862826...

output:

173752705
193370044
788160077
583085540
480134223
578257593
565690635
976377251
815433823
569888215
942077488
51655097
701441370
628575981
560401828
725332408
210042066
684240542
391867395
666730178
834361092
324638980
776386381
904295897
135765499
543427054
143874075
56637393
592888584
253597967
81...

result:

ok 20000 numbers

Test #26:

score: 0
Accepted
time: 334ms
memory: 3812kb

input:

20000
2003162185697
2960094301611
4662721655021
1005129009405
1324394100211
2188709695749
4881006883643
1350476984505
1317750624751
1787171729923
1030091866301
2387547388201
1493909840921
1033724228501
2631714631465
1030346895071
2784577592319
1455032090635
1504050159215
7025287727947
5559969534159
...

output:

744701847
680841837
807700977
146325766
131282359
716811887
750464597
691146713
789582502
954773474
626053099
134937895
184132335
558072799
355765684
925356212
245733761
52597707
443393617
537214537
501724788
6700647
847298895
429018864
762690293
380508932
913355126
15514455
172501082
94686864
22061...

result:

ok 20000 numbers

Test #27:

score: 0
Accepted
time: 333ms
memory: 3552kb

input:

20000
1161864977005
3326542283399
1580231112771
2872526464655
6658968176461
6647474182141
4556549031503
2204503712693
2404165412945
1655367939195
4296657902341
8377190702085
6388092243785
4951654818967
2172973856625
6017822976273
4309402160479
1463084607985
1543749598511
1446700807517
6957562926075
...

output:

661989128
224362481
806314152
91164156
328423027
954190832
59178750
174353382
364726981
478564145
48802517
816659049
261655223
455794902
362430838
773599911
423064040
231637419
618271857
341645843
671481511
188219363
934416892
500895588
153198635
724762491
936820395
907167242
859470654
645446516
568...

result:

ok 20000 numbers

Test #28:

score: 0
Accepted
time: 309ms
memory: 3584kb

input:

20000
527093935619
752779588203
786924382569
757279595801
133942444031
100421166601
263778172121
399840085835
290318874619
253782306733
124066366239
501647965005
410764644711
258390545671
194780973259
133110297813
189976400135
106777772555
862387423665
130339342903
138132954519
209506321097
90932963...

output:

421580252
572987992
640384503
768083278
551673238
285027389
109548934
842050561
198751336
586014513
113281509
628353675
832045996
412272320
626851402
111775850
927067178
625397410
846045650
93345199
989190640
524451980
651348652
609125668
277940988
304075150
674954975
247521439
788784263
641374484
9...

result:

ok 20000 numbers

Test #29:

score: 0
Accepted
time: 312ms
memory: 3636kb

input:

20000
102654101707
307257960211
908107589995
183758327811
105517112605
640728922989
804937345837
446778783329
219778833861
780154709727
613780423087
274713457773
730862879575
870540037721
148972320847
167558517019
384814721239
165239430527
500372840797
461759334671
560905068561
678325389083
14904456...

output:

468320309
637565527
228115050
486701933
66386099
952252042
893858975
405322309
394057423
925317177
136732991
563433996
621258763
443189212
965506028
159842227
512917499
388669175
759131556
736844839
422084430
789987099
681915459
447279827
209214533
753653584
179467242
435185921
76827511
79979183
512...

result:

ok 20000 numbers

Test #30:

score: 0
Accepted
time: 284ms
memory: 3856kb

input:

20000
18651654293
17319824459
18335467653
14659282251
78540104423
66851670581
19582727001
16803084679
10521909745
18447332619
27497248093
64997102721
29482665749
75431854503
25148819051
76116640379
11336977989
13703366109
98408474625
40696059569
50404508959
34545660911
11146577553
21650161115
190130...

output:

456658423
1882688
174170504
495454477
746043206
665329185
7390235
837272466
563975223
19217044
241497467
577108403
896829128
507187244
158035062
289167026
920514074
355783552
677916348
319679431
916873590
810781427
399605922
973727123
691325194
469583333
16558901
391208373
9719325
964327069
34355567...

result:

ok 20000 numbers

Test #31:

score: 0
Accepted
time: 288ms
memory: 3632kb

input:

20000
95411217813
10839255181
15705734399
36025351447
65756306045
20111659539
17314582489
99429434641
71798583213
93146343355
48111843535
30739743517
21672603007
18162937875
12033273461
18515236779
28369713641
37274602353
42558078023
45875982763
91010393693
59323988279
14005459597
10485875661
404226...

output:

731393446
658413191
897978787
22727669
26663528
512090889
548415694
425125899
647537402
567987817
875599921
902562976
270927660
292734782
562840895
290009904
524360847
433623803
778918978
892280895
780530244
563355503
76473394
461344068
741510596
629065983
580983898
609486846
946839076
481589949
869...

result:

ok 20000 numbers

Test #32:

score: 0
Accepted
time: 253ms
memory: 3676kb

input:

20000
1377890967
1566992477
8283478561
7970894747
1126686413
3113628197
5090274121
2949775211
6275130113
1786548097
6563789685
2211623967
8213767399
1182295849
3816394281
7648177351
1465834461
4979234163
2294046407
1315781991
2054758435
6281100953
1551358319
2224928727
9027842027
1368954705
78073152...

output:

125112735
11918199
702862743
237406884
222047215
172562152
379251206
783590711
920198606
257676921
245229072
745107783
105497803
495765250
203259096
169221842
486131910
910960769
193909955
841055316
745725967
833558444
416187308
456878324
721586113
613440941
92214913
325687557
976002043
517928169
25...

result:

ok 20000 numbers

Test #33:

score: 0
Accepted
time: 259ms
memory: 3556kb

input:

20000
6371680865
2488800365
3436756263
4503311551
6383365105
1681623679
1325850883
4871277533
9231123955
1229610501
2212922735
1009823745
2059328713
9978314393
7139352037
1014938713
1723577109
1481182623
3664060827
1615502977
2220894819
3003457057
2733648303
1259583949
5385578829
1083729097
71621785...

output:

537757731
16545717
322137343
507675921
898424376
960826059
500739424
647942047
949118458
276966636
210631164
417425937
981580077
126616021
716030052
437506398
794032309
911819281
950845920
39830173
710844360
251371934
792800626
958610176
652026604
266162766
529186580
325985993
660992369
688415792
60...

result:

ok 20000 numbers

Test #34:

score: 0
Accepted
time: 245ms
memory: 3616kb

input:

20000
949180041
574165393
333185999
520182915
761318741
125639731
167950167
304562065
389919909
415384157
630369211
812778591
266471003
159941283
150084119
660145607
388322495
909958767
410103163
488308015
103875561
531239527
161404637
647144083
393953117
743529141
142875853
560095953
115481117
5126...

output:

764019945
543027074
504808679
169625192
984252354
237967352
498083450
864898646
724969653
515748022
119848071
637469263
8828544
986547494
163481539
468258006
914141465
188478104
887732620
508560279
448514330
378761792
663648420
571580045
848665067
955392984
315320281
899144593
282785754
376636786
10...

result:

ok 20000 numbers

Test #35:

score: 0
Accepted
time: 202ms
memory: 3636kb

input:

20000
36981339
14744481
58978537
36808863
23386801
79115669
31137117
22622465
54198641
36802887
90435905
35240157
46653669
18017471
10922533
79007379
39723607
16324397
91608459
67294409
48063883
13587825
51312815
87668491
13130337
55919309
41593863
39079075
51201369
23394327
23112179
37578093
196016...

output:

173344397
994170620
313271334
326318138
573539807
505141075
758793706
802679150
983476847
744077852
623527036
588889994
506484779
511830908
122665870
567886591
310444392
345332643
610500742
226718227
681122753
745923307
243746873
905595576
165942052
720155468
132111809
806986789
413751238
892513971
...

result:

ok 20000 numbers

Test #36:

score: 0
Accepted
time: 181ms
memory: 3640kb

input:

20000
1753413
1093701
1989165
1781317
2667415
5754693
3215695
1752867
1488473
1327107
9005357
4018053
1629709
4176957
1170307
1467619
2515419
1561535
3209935
1526511
2601453
5281925
1334645
5899683
7210121
4571187
8463433
1885831
1366771
1026583
8086659
2174125
2223137
3659341
1673727
2146049
640110...

output:

230011567
155832191
41471934
587794525
537463869
60321422
340468781
331691773
901779625
233672534
231761793
374714
925219397
127623355
423898790
761742551
376557742
549289938
913523505
235531177
585783921
602369094
77818453
392482827
216551198
377574485
201727007
341984786
580928288
829461247
228036...

result:

ok 20000 numbers

Test #37:

score: 0
Accepted
time: 153ms
memory: 3612kb

input:

20000
779011
109917
212629
217843
272577
730755
426117
900535
310351
331871
919663
348695
631883
834705
550753
498521
158545
144181
360459
960041
340881
389461
764087
173269
500275
246917
264851
113359
125455
213793
107327
358113
387863
172843
186737
221127
636197
317455
140825
419133
132149
446061
...

output:

683388093
384145753
818471466
520676653
84507021
192120157
808951976
997798290
163182080
507277449
576032941
468753815
29530868
512037117
309872267
428964209
558551027
977815974
5418780
133751139
76034808
536620363
752835778
586000889
647931667
231160008
159831182
539137315
148417861
232679275
44038...

result:

ok 20000 numbers

Test #38:

score: 0
Accepted
time: 130ms
memory: 3548kb

input:

20000
57481
40955
63573
40979
59037
31553
66151
44095
10641
33747
46177
85943
34137
11397
26753
54583
39163
73417
12751
78387
14273
51289
20503
16165
49531
21521
11945
19543
15685
95945
72891
18937
60331
76513
63529
56511
42131
68725
43105
86455
64339
11921
52683
50067
80545
65145
12255
16899
16475
...

output:

104246466
396892735
464314112
707195124
635762194
516384668
858589529
363991942
486381989
718520269
224374292
607140954
493939548
766016799
816764008
566630680
945387338
616485131
546965049
427056358
604934878
136623826
444065301
628418319
236432055
367722423
419689145
690666432
830379608
84106770
8...

result:

ok 20000 numbers

Test #39:

score: 0
Accepted
time: 103ms
memory: 3624kb

input:

20000
9161
5113
1353
1599
1077
4127
9945
1089
2411
3617
2341
7795
1031
4341
7901
5693
2843
4011
3661
1669
1897
4505
5835
8473
9021
6729
1075
3261
1571
1125
1009
5839
4375
1127
3581
7307
4821
1133
6799
9203
2839
2213
6643
5669
3279
3759
3131
8569
4203
8323
9607
1105
8879
1083
1819
3001
3759
1153
5517...

output:

821779222
984764512
237774271
593256027
955699651
178355200
158900856
948133576
351625257
940830566
169354506
334070990
250494961
484736909
656220408
84168430
739814027
890357707
953657
812448195
599056864
595687942
207992954
144996055
589952971
899308759
271890729
32242849
408423379
598931394
85680...

result:

ok 20000 numbers

Test #40:

score: 0
Accepted
time: 330ms
memory: 3572kb

input:

20000
4880210217
128143155853872689
212346864226378825
246471197170680321
7933
541729596197111
720704567393119
8710998075425629
76112779674741255
2638559069880457
3890657629217635
70154175
22458679147301565
704332661796465
19481
728037025
75509436184390497
9555
37697547
885274825
9775
30125036887310...

output:

438277423
567915605
987141378
784874983
818324524
68933931
7120239
813033330
584528522
806705354
755674099
877544320
372479706
634613354
293203869
196355294
164434055
494473211
223388030
479579028
791707121
929450344
787822231
395842243
765828471
500948508
764130997
972984811
698314628
879679200
171...

result:

ok 20000 numbers

Test #41:

score: 0
Accepted
time: 330ms
memory: 3632kb

input:

20000
2263341258983
68861
21441624879927465
61657224027
38511789
1134293955099
2262141014209
1636149609753
22472977
53217733171023
450682864247471
38065558990911
1702688469
541167822489145741
2626277515
1139005
7452855
4852880486297299
394403152172105
4170408347
53920301423430817
116459971099
889394...

output:

669004249
31334080
972135795
924306517
434093078
232915772
43009232
867450515
824068408
65292489
922967732
58719080
584047256
11576209
584904932
62936952
716269966
685670071
45733445
505819574
353938348
896699419
151130433
864757672
721958964
345979446
9614927
398915420
30753278
165329645
715716290
...

result:

ok 20000 numbers

Test #42:

score: 0
Accepted
time: 334ms
memory: 3864kb

input:

20000
20764954253752049
115889116481
38814824404853
1115851
59777988427406147
591178787
269403510288627
68913910609715
9838275
862085381435869
1205450307017275
3617205784511
469581978779675457
350354153007817
3949365039569339
2172749326875
27641
5252598758689
91496778925
2259
4990711
352134844756818...

output:

839590786
548294398
410861853
675183529
224437895
956221627
558310502
882018623
247631662
237754788
752912919
352337583
466086874
60885361
169285492
715237279
276634712
623878138
983131700
294664824
981853654
759838275
7452502
47114212
157006606
307363751
664528973
972305300
210118238
430494475
8938...

result:

ok 20000 numbers

Test #43:

score: 0
Accepted
time: 331ms
memory: 3864kb

input:

20000
35126061
11272943
5687035689925
855594861443
17609603513
8275
9702178196659
10651952172827
12597973391341915
10568449405
4153877594877447
391923060195
1155033267
1880772153779
31988177327
79501629913724131
30144291343
865153553205564485
3533380317
217917681203198731
291038067
89035180202321
80...

output:

307936053
298185450
432680371
955957667
599127528
563734228
537753890
266961510
54621949
767797891
490503757
997567998
414105557
605848262
470022002
866733810
611606808
956552084
234828398
668380383
336200271
274024318
463668998
324480475
684567382
117190321
737160687
691476015
600755950
551066793
5...

result:

ok 20000 numbers

Test #44:

score: 0
Accepted
time: 330ms
memory: 3632kb

input:

20000
6187902972876029
24398047071375
28334818873
4502571
839894344985
949325395083618817
618422461516037889
86470910710178257
1452379
9902996637
56415344103717
7066480149
296351555379639
661417855100723
1575466420989471
2021
25302536531958913
18258662303
95488816439
52067752913
1384397323
264291103...

output:

111683605
242224837
469256243
639639543
430083401
5702656
677915200
972158626
948788769
930012556
523674560
272474063
635502232
687923745
749950665
803978788
994973996
211293097
662283267
429899081
803930899
926282964
383042463
239195223
538275844
611317369
310658002
964139861
228897679
37539195
581...

result:

ok 20000 numbers

Test #45:

score: 0
Accepted
time: 334ms
memory: 3644kb

input:

20000
31477
50665111161295
3277444333855
31769298475081353
42843
6990800924221
15457743579
5807461785460493
1457997899431
6714861
206368576987267
105468390363
1945621442251
191466321
16053301597
7011
3688012530436637
23903040541
7493132962450849
5421551482219
823089
2254374525667565
8439943
75201919...

output:

634242396
989017894
171540561
698030025
885731642
564357711
458998324
887613132
534864953
615125741
567507973
515657618
699731864
395925147
37698367
169410631
760707213
375625516
939849222
854587289
290290730
92466309
28479048
37893036
174920960
703887359
104340141
814503245
84199914
832728316
77246...

result:

ok 20000 numbers

Test #46:

score: 0
Accepted
time: 326ms
memory: 3696kb

input:

20000
97454541143147
8779271137567399
547050075
46252967
156478226709359
537995016691
25610392593
188639042804645857
21041617
866837585133091459
8869760468531339
61295876108543
10407986795111
24665548391
4523887244581
259602745
1073233181
279169
21344130998453
879043983781033549
37118373284981
20012...

output:

11791685
516091917
763754810
282687447
107403885
582014162
541538613
588371807
306775497
132803132
834173140
515895490
721098031
308820934
95785
31660210
589853891
68892248
400643698
628458373
88866682
697140811
524027737
824196013
172168818
193984994
159360453
977713179
437724639
556118920
58009840...

result:

ok 20000 numbers

Test #47:

score: 0
Accepted
time: 332ms
memory: 3788kb

input:

20000
335426523819688139
3609219182893793
312274225599
14958237
707740519435
457448650564999
3392743473
39811034193
8626025869435
444363835829239943
12972409398526019
20237574813
55446596663070001
700413975361
4785670368047
1239879446730023
465156090247543
59867363499190583
7746889397
69594597074217...

output:

614871497
250247321
194620133
678271141
27980450
201864497
317497155
165684373
575386159
950565402
629099191
593490567
115745082
414148435
188366227
557498558
651295472
95665886
456908108
890936393
920230293
901734627
163274973
376990264
284796815
665537874
172266935
457539028
605494293
170247400
53...

result:

ok 20000 numbers

Test #48:

score: 0
Accepted
time: 328ms
memory: 3652kb

input:

20000
247769163533745
6237
93818188713288001
663517608331706801
1149438271655
11814665914437
2902791829
3787971600733
1822540994504145
5802363953
2798744463692121
26016315220025877
469453
26049412336675
53823
963740621516847
1422013884385783
874192216826615
13798753618151
359629928158343
24211819133...

output:

292640212
9580937
458850723
884225176
306659248
424400803
565576941
462307323
403282320
903059444
982710042
146430488
856359554
30308988
349533055
145704221
444776135
426867715
766727899
523857873
731870110
437677066
11628653
477002013
442697462
391510792
560237483
448737135
912517342
101021795
7210...

result:

ok 20000 numbers

Test #49:

score: 0
Accepted
time: 327ms
memory: 3784kb

input:

20000
22531005611473229
1664265
4034407
99398250740210859
527080740616477539
3988205
1541
30096328079
81470829114159
3785
211694796485
16609381
42526449118050633
234462375377593
59172101
69691875
9634530867421
18658137882685
446126549094455
59673963
849541443
591548730818893
123220064511
31791597165...

output:

773532934
512182400
18741540
437561160
105918590
573329592
869800561
592391417
192992254
583372705
255704601
332199931
147492912
476414788
801039491
646843348
597214632
938261425
100683569
404545221
759637386
531836553
17315058
586650181
977845078
532918975
960555969
378118341
476710023
638787677
74...

result:

ok 20000 numbers

Test #50:

score: 0
Accepted
time: 163ms
memory: 3560kb

input:

19728
400413335551
474031186861
894657268787
589069891195
246147915301
536228058927
182064181309
269728051571
652785988217
200812870837
747720725847
545730938171
836731714359
586516649951
626053290065
173901750311
267243616519
920464482549
331679125219
584308557743
584254669811
278347999719
90402225...

output:

785309067
171506592
658154781
415775332
387844028
182790962
314216217
141816756
967753489
785673242
323294761
841750889
810980127
117325879
396550383
504543705
155630596
493260529
543134450
151510054
698361573
459518591
838006566
678076305
29441342
158062442
947968809
129957630
453323544
22724018
99...

result:

ok 19728 numbers