QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#602454#6297. 大数3un_larryfunc100 ✓187ms9536kbC++202.7kb2024-10-01 01:24:052024-10-01 01:24:07

詳細信息


Pretests


Final Tests

Test #1:

score: 5
Accepted
time: 1ms
memory: 6000kb

input:

163
60002404005212505506210966350660502815442420040280094016088370690020206492660039540622056442026358030847582205724240802424056882025000436632025922080408540508232724904240802816021003048824574086068661080020971686690074822282497457029026422685004862025027848508000205408307860683034808450050214657...

output:

35
414
75
1020
93
2563
279
1310
1772
153
837
318
482
2
50
759
185
938
140
1057
1981
1024
1145
120
1034
1103
1446
228
1675
332
7
4
662
14
115
1229
721
24
128
3
46
1421
2267
841
44
352
77
30
13
285
217
1119
90
202
626
3010
135
932
1637
51
382
575
43
353
2199
229
57
706
496
1425
152
715
684
98
1675
17
...

result:

ok 999 lines

Test #2:

score: 5
Accepted
time: 1ms
memory: 6040kb

input:

13
356058066800614806210292099280082002842485540180027502462880601424908532207003800407302026750202030680797456450652400468803376023701503600001005500700013584084105302008008909251534064228005012062080466870307029840255340086704634020750000225884600157036600660250080048060062603182960152570360402604...

output:

9336
1037
29400
4342
56
21327
5
22
7441
4617
2
321
1718
2808
5633
364
3828
887
5626
433
12239
9430
4902
1035
16342
10081
4857
4682
26
7130
40
8377
2634
10280
1840
4757
1347
1619
316
1146
1676
31
6679
6410
617
605
9465
3776
3952
224
23486
31742
2465
292
682
3695
12995
9536
3604
12616
12112
118
74
219...

result:

ok 999 lines

Test #3:

score: 5
Accepted
time: 0ms
memory: 7924kb

input:

11
492804226800478400654206043008905066530904144080470208220241203908950009008688004605994629406861053096872037188920246059160600208050940902999610681208567057060058442750444202507842259546986534596652607307412068445484540068106148805086410471510043837200674001694608557496600924852002152079848295001...

output:

7199
258
3481
27375
10262
585
38088
4725
29972
10573
633
26595
22323
13496
6397
7479
13162
2022
20629
2467
7027
10
1080
21927
16331
1450
38
8
13048
5361
8382
14704
1494
6615
17
3400
117
4242
10497
604
25931
8812
10184
1254
5124
761
3981
423
1864
1378
7784
6838
546
458
18460
11693
1710
6912
1596
5971...

result:

ok 999 lines

Test #4:

score: 5
Accepted
time: 1ms
memory: 8052kb

input:

151
92400644801424886370452906486810964304062530059608960208462285802152084740628051780225824061040084086485460445060604020100629892821086826054740200956366005503058800488020056442700509640252080809850576640000090202690948203980793577726192707464828201814004042824672528002170006560006058900445864420...

output:

780
1640
993
229
21
1740
170
16
264
530
1002
352
220
1139
3218
835
170
269
272
243
337
7
581
49
908
154
329
1295
958
20
1957
329
388
24
1347
834
134
35
1062
1761
956
1146
56
226
15
1148
283
812
352
119
818
429
1
36
1102
2145
820
1869
3423
230
280
921
891
3194
570
915
3
241
562
1945
57
170
381
8
30
2...

result:

ok 999 lines

Test #5:

score: 5
Accepted
time: 1ms
memory: 7916kb

input:

19
062460884571805466605840600800568440001008084698256606292308900434040030651084974908381404128445510560002822150403898049529162858682856958702602800522642650826899506196000250002080317176040124223209603009816718284004022940080809485668240004900384636995046430700201070829148203455046043028452604277...

output:

391
15672
9731
446
396
4207
18451
8951
8835
6152
13
1255
1029
13771
10
1038
624
1166
400
1466
2296
1472
7781
5213
445
111
11110
1
2466
1842
3670
3855
91
4876
6617
16056
17715
1964
2122
14064
21
5858
504
150
173
3482
2739
5288
1530
4144
5590
403
188
10130
5657
11044
6813
1682
4674
421
6350
3590
876
7...

result:

ok 999 lines

Test #6:

score: 5
Accepted
time: 1ms
memory: 8064kb

input:

157
60603082080841690823470270546202206438455924802502826205790202050057388258204088570064213362906000844646688666962862807080061844000520587080202004212146022440887404932066900390600840460850808220510200080028059484574109222030184328296544600226332404961074835080455528062000486028460064069240200045...

output:

378
1
307
68
21
641
2297
77
105
855
789
2590
1677
929
658
1105
1518
2486
2190
58
61
473
1643
2094
227
692
317
370
225
90
34
825
1564
150
518
426
40
173
422
1159
84
2661
35
188
87
413
681
159
35
41
82
2709
1332
1312
117
121
998
2280
690
107
244
182
732
97
3029
34
407
1731
75
136
1817
1525
769
1299
7
...

result:

ok 999 lines

Test #7:

score: 5
Accepted
time: 2ms
memory: 6060kb

input:

176677
98038082602429960404078604368566832600062306200902448200023580525008812435003894444066267588064008574722246826000652442006065062492800372526076009934055415206645628846606009029528986036282683206844360904002442584475590004266408090488548460004354570780115000520900600400456066108022400362802194...

output:

286
120
193
3188
260
1354
115
506
2749
442
2313
1092
1857
542
1655
3366
386
3255
489
2434
532
2086
2092
2986
807
1087
840
878
515
343
108
2027
3649
451
1053
1052
1283
2034
3373
310
110
252
70
975
875
1825
2324
687
53
35
2182
822
1850
346
2984
271
1250
714
2771
1004
566
74
898
593
32
2149
1089
1650
3...

result:

ok 999 lines

Test #8:

score: 5
Accepted
time: 4ms
memory: 6132kb

input:

167471
08687321004445585823084502080209024488842801101009532528855200240067223016041664063465488604822169886486704630357843500208533558450920608608226022609821408666433740068829300265061090638420148500007445366087540808085640627506644487584007488322640771800878953750526562004720640410200505550566069...

output:

1729
2622
3319
3355
2389
2415
1374
872
2075
383
388
139
182
625
111
759
2340
234
309
2581
482
1432
1108
3820
1818
2037
20
1422
699
320
1263
1986
1599
1711
373
534
2538
1617
2311
491
599
533
114
690
580
365
107
820
813
1020
1275
383
402
907
612
1873
1821
114
2053
1270
1260
2330
1605
1169
1915
759
122...

result:

ok 999 lines

Test #9:

score: 5
Accepted
time: 0ms
memory: 8120kb

input:

125117
46467011439080064680525022800501068622086606260545504068600440788995410886608042045485265022482066560002252284722808604697500050061648050638220320230455130460807540622840220787560821004663970200288382656062550984658082485540455300058888805265602900952300020002082612008542164540102040054052406...

output:

2002
946
274
3062
2547
2024
2107
2527
930
1551
3070
2235
1220
1544
995
142
2766
1115
940
649
3217
2425
1366
229
1067
819
79
1524
708
2299
2590
822
915
2683
168
1424
1723
3101
712
3344
1464
897
69
1174
685
1314
1420
636
1266
1062
2429
372
488
1507
2597
3061
1915
878
1317
650
3943
601
2108
271
1430
11...

result:

ok 999 lines

Test #10:

score: 5
Accepted
time: 0ms
memory: 8060kb

input:

94811
064498552605045242460014415684670856002720906062820026980024063746075881500842885468208671886457428260236356056029700802502811494828202380018040090001544020550091246020125428574608444726598003241002050444209445474540080628424943576060006827165088402600200218006027900705800404069843718070206588...

output:

863
307
1079
1504
648
98
825
140
111
172
311
1005
677
3889
1022
2563
607
249
1721
19
3597
2540
1945
2002
1538
2002
1188
1304
579
1449
2979
2713
1336
444
271
1121
2030
3123
137
290
1376
2812
2779
1619
249
1803
68
66
346
1294
941
1668
617
2233
508
1519
2504
1052
2468
310
1148
1868
442
534
153
1473
212...

result:

ok 999 lines

Test #11:

score: 5
Accepted
time: 0ms
memory: 6108kb

input:

176809
89054966648360883018108042526904580746120642011029022664084700470668725785658056070677618602000645950259006900556088546896050452400244070449098610904300070630800568208624556020880999210892605603000200632355000440808980040704003642016006940584934400209060030080445214038405994004100426982781202...

output:

572
669
667
684
1772
1538
625
821
1313
1483
429
868
2699
2620
799
2237
1570
62
490
2406
131
1750
3099
66
760
3153
182
672
2448
243
1747
783
726
818
1692
1195
140
573
1763
65
2153
1618
849
1746
570
724
908
2018
2501
569
1756
222
42
269
559
441
1767
1166
1610
1214
1862
2455
2372
845
2792
257
63
442
33...

result:

ok 999 lines

Test #12:

score: 5
Accepted
time: 4ms
memory: 8180kb

input:

51349
400004700420055305840024805604802002846842754030479039670280200204855048678464200508075408860884006042560860050028304207280804136808878965320060844030660008030662450850480050000600920505508022054658290592964204084386869160442604708654062068004061218004407567204846054032660029000002100288876662...

output:

409
3611
1123
901
150
409
842
2211
400
1133
2232
380
3382
102
3078
475
404
1342
3343
3182
1239
1514
146
893
1040
1400
411
393
608
1785
1035
786
2963
502
3996
703
195
67
1467
1225
1542
612
1838
2225
2225
646
256
886
715
620
176
641
2863
2630
4317
1708
1837
3134
866
891
1522
348
2609
333
610
553
2521
...

result:

ok 999 lines

Test #13:

score: 5
Accepted
time: 180ms
memory: 9208kb

input:

248696731
24190602435874011306440240262508700009850402028660860437011022083070860028553806004062144804540269060308186002850966506851608788220172228601010443445080886024890896206064025240872042602862340560257800405048887082256014287520540026054408955400485055609087980860009422007052030880890460444057...

output:

21219
13252
1594
14681
34575
6233
5011
7967
16496
22899
4521
15527
17747
7174
16950
20549
16990
1685
3260
12406
10484
4939
9580
23593
7327
4260
3814
9543
15270
21496
10609
21174
17163
1104
16073
19279
12013
3394
30050
23968
7892
20463
26569
18946
4861
16967
4089
3948
25246
9280
1847
6648
2117
25876
...

result:

ok 99999 lines

Test #14:

score: 5
Accepted
time: 179ms
memory: 9536kb

input:

165832717
00058200087705070597040914282876411706364573302747707516265640800681070651061479865040209024390075016200748904456746324001520200308665409050154798412462003464666506210056803466044806460256044466604425550202250004030984080585914440126880420622226060606686320567559012340665807866836006522785...

output:

2345
9355
17649
3581
10845
2309
4831
16203
5476
9242
2896
12229
23352
1864
17955
7950
2881
2627
17139
8689
4222
1070
6379
29955
800
840
33379
25147
15660
15631
9628
24423
4743
10539
5678
3192
21033
7263
25996
21295
12875
4001
20556
3897
15757
2965
26340
18921
13595
17640
16041
22318
4675
1807
7535
1...

result:

ok 99999 lines

Test #15:

score: 5
Accepted
time: 187ms
memory: 9456kb

input:

941741
82000360502832214762040003656450559004655600202535297602388074780704390908043025410026008480210408513262006601038321678990280602580336752660026806000324006078270543650107288027604456583884801821681045041088400570414004046605244342487071052308188566530522406204695320990643207300005404726324100...

output:

7718
21323
183
11439
27195
4039
11236
2438
13974
6695
5232
10134
15985
37650
7565
3804
14228
13447
5689
24442
8918
17067
6041
17168
35279
4149
23954
9273
24473
13965
8314
21699
7637
3334
4207
4775
1957
12686
16895
854
9074
19468
27389
10898
16351
25928
1576
35830
6020
13649
9832
10763
5375
16069
355...

result:

ok 99999 lines

Test #16:

score: 5
Accepted
time: 179ms
memory: 9176kb

input:

72294553
058164288548668472347001000422150025006684509348806550440450746266008024804001853009084623107800906874242828850228880080200702698561096404320040240692421940222522247200855048620858662242580459586400096838078621866600444565001450042280040404081223505560063645788264832200653407066258659240047...

output:

271
2664
22251
8414
27113
17693
25891
14255
55
4500
16191
3418
6205
10375
14111
16877
16360
26324
7074
15677
669
4024
1969
3192
21866
17776
1465
28407
20496
15849
22730
4949
3917
1458
5086
763
13585
12154
9439
78
23255
10880
1871
8096
18261
24802
30021
11856
26195
16627
11523
13872
1597
3807
8991
35...

result:

ok 99999 lines

Test #17:

score: 5
Accepted
time: 101ms
memory: 8616kb

input:

11
604908658068060908108685607456067605270012060140600744280003180578480805400448502060140659446048696724680800082285832504284946800274961665082420952825846842109122080556600018304626020000644221075847022063587260584870020826634000040608000100630101094420340662266456841726222582023886491022200456084...

output:

22873386
108957923
41137854
75549357
20868
82294800
52196430
8600249
23315043
18743878
101296319
324869
136184326
1669459
2213873
23147251
23728568
20701372
14989353
285693
41181723
12922606
341970043
5135797
104466444
55708897
126550741
11607029
427565
108798972
50802961
206039520
56693793
38362887...

result:

ok 99999 lines

Test #18:

score: 5
Accepted
time: 106ms
memory: 8700kb

input:

139
87840846972032206061086054200080835203245000604403209005668146208846346001516535587840643004022061582605590748202209054852666062463480500066684800842502200000084266046040264063808607585785008400445220764562508916880426906856066022562773066165039448662084460225762478020523120081042060905002264687...

output:

456971
21684
11805606
963044
3005749
3226448
7839573
1816207
11608240
782789
972213
1209835
110778
960048
921751
2112117
169
9635881
4974280
6648184
627839
6349211
132859
827867
6654730
1680985
14876618
1594786
92596
2635087
34658472
508975
108668
20187
1224513
40586
6156625
159812
3662825
17989553
...

result:

ok 99999 lines

Test #19:

score: 5
Accepted
time: 104ms
memory: 8644kb

input:

11
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

output:

164608900
87030241
364065511
322316026
4268356
694812545
253475825
199374400
114757656
28431697
60856471
2359725
13763085
21796642
2338061
4926180
56255411
17869523
2664457
164497670
72162510
2386041
604506
5283499
912766457
103066320
758210187
5321173
30332556
319015321
171293140
9557887
16370116
1...

result:

ok 99999 lines

Test #20:

score: 5
Accepted
time: 101ms
memory: 8552kb

input:

11
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

output:

2555202
310675876
692016761
383310691
380689
136900
811019821
353792496
479556
97584762
58011072
189524016
33112900
66610082
1862235
58031078
60661864
63325473
97545306
166887642
92559425
627146
569514360
613298931
73820487
151722862
51594544
5315303
2250000
201299344
23637235
11995832
14958257
5863...

result:

ok 99999 lines