QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#874072#10013. Adding IntegersMilmonAC ✓40ms3840kbC++17480b2025-01-27 13:47:572025-01-27 13:47:59

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

4
2 2
0 1
271 818
141 42

output:

13
1
812506614
405709861

result:

ok 4 number(s): "13 1 812506614 405709861"

Test #2:

score: 0
Accepted
time: 0ms
memory: 3840kb

input:

100
998244353 1
998244353 2
998244353 3
998244353 4
998244353 5
998244353 6
998244353 7
998244353 8
998244353 9
998244353 10
998244353 11
998244353 12
998244353 13
998244353 14
998244353 15
998244353 16
998244353 17
998244353 18
998244353 19
998244353 20
998244353 21
998244353 22
998244353 23
998244...

output:

2
5
9
14
20
27
35
44
54
65
77
90
104
119
135
152
170
189
209
230
252
275
299
324
350
377
405
434
464
495
527
560
594
629
665
702
740
779
819
860
902
945
989
1034
1080
1127
1175
1224
1274
1325
1377
1430
1484
1539
1595
1652
1710
1769
1829
1890
1952
2015
2079
2144
2210
2277
2345
2414
2484
2555
2627
270...

result:

ok 100 numbers

Test #3:

score: 0
Accepted
time: 30ms
memory: 3840kb

input:

1
1000000000 200000

output:

523488855

result:

ok 1 number(s): "523488855"

Test #4:

score: 0
Accepted
time: 38ms
memory: 3840kb

input:

1
999999997 199998

output:

796949583

result:

ok 1 number(s): "796949583"

Test #5:

score: 0
Accepted
time: 36ms
memory: 3840kb

input:

1
999999992 199989

output:

162117585

result:

ok 1 number(s): "162117585"

Test #6:

score: 0
Accepted
time: 37ms
memory: 3840kb

input:

2
999999994 100000
999999996 100000

output:

867498066
54580939

result:

ok 2 number(s): "867498066 54580939"

Test #7:

score: 0
Accepted
time: 40ms
memory: 3712kb

input:

100000
388240628 1
312699582 1
100255745 2
376518842 1
394491831 2
912102945 2
763407507 1
769189542 1
367478694 1
514941461 1
783453991 2
834334406 2
212423361 2
797217155 1
117515252 2
110557831 2
833706558 1
200873460 1
712447090 1
288164962 2
908559074 1
696025587 2
881558817 1
993732613 2
93955...

output:

11460705
693079679
510938621
738274067
945025194
680841198
997822263
430597926
902966922
460666546
594185680
828812582
294729277
169357798
728430118
241937065
381903868
77689422
991275711
554283908
569997194
75335630
542662260
851345306
222921166
538946985
268797024
411992301
337222874
335720314
487...

result:

ok 100000 numbers

Test #8:

score: 0
Accepted
time: 18ms
memory: 3712kb

input:

10000
832675221 19
32587335 20
530425152 5
979960749 11
763241755 7
123131278 8
584641653 17
868108113 13
109175006 4
548794026 4
994364706 2
284548621 19
911256926 20
161866370 9
866523993 17
264050406 3
451239937 14
240643792 20
850824079 5
831016898 8
356312018 9
81384381 3
109789291 6
351584484 ...

output:

540199586
825176559
300671624
636828249
770833915
733373820
549709082
747792779
234564645
662519723
596381797
159780091
185586625
403070769
798927098
12443779
392293747
234109093
779350129
177850031
625621016
306808796
917027334
889092406
835347105
517587266
35072525
968511485
37254731
571135880
451...

result:

ok 10000 numbers

Test #9:

score: 0
Accepted
time: 1ms
memory: 3840kb

input:

3000
7 30
28 10
30 19
2 15
22 6
17 25
25 9
10 10
19 19
1 10
29 21
23 24
16 1
19 14
7 13
27 9
25 27
25 30
25 19
11 13
3 9
13 13
13 27
8 24
17 1
8 17
0 8
10 20
17 17
14 8
4 18
4 6
4 17
16 2
11 20
30 12
27 5
29 15
20 15
21 10
13 5
6 2
10 16
23 28
12 19
26 15
7 25
20 4
8 15
10 2
28 6
26 18
0 7
13 22
25 ...

output:

97561222
22553555
471548823
1495
608801456
400130637
507258525
921992405
107925364
65
516405531
165997875
65536
136068875
241561424
915200933
676035353
853736917
138736559
741589152
3024
377445867
931705629
100255379
131072
6325740
8
284956055
311700714
113810733
562665
4675
432344
43112257
31847014...

result:

ok 3000 numbers

Test #10:

score: 0
Accepted
time: 27ms
memory: 3840kb

input:

500
717955081 305
17930176 354
407493497 391
531771420 357
459872577 394
753624805 345
817301912 345
657948399 361
847869243 363
256725524 391
96319942 378
626249567 331
862363376 302
789476116 310
632967651 314
361797011 397
536104113 393
552762362 322
497191308 324
825078224 343
806605051 342
4054...

output:

614417972
353583865
362002539
590422694
632596113
134207650
43972303
498046114
30650119
868423335
775197621
310843124
816284086
646234181
1273693
891099869
796098044
102955670
727554890
807035333
791906262
545841083
169747385
839808759
700326027
62178033
722975337
898120109
511002361
34344153
571640...

result:

ok 500 numbers

Test #11:

score: 0
Accepted
time: 36ms
memory: 3712kb

input:

19174
520042039 11
554348590 7
925946595 18
626323820 10
583291083 3
967940806 13
116885489 4
311251007 16
164114288 7
398672783 5
512973475 5
349164745 12
502383301 4
973202977 8
742857636 6
707005827 7
916253379 2
819453454 17
825233138 20
288410345 7
967381770 2
664133949 1
286817421 11
475858862...

output:

104138000
356464849
645603451
120295481
965464661
452639815
358946094
823259185
733445413
203702597
347580476
146940579
719134878
619586347
693883386
107484732
11401261
186614317
74505935
110397708
841350216
831651518
138918547
769469555
436949980
383774510
560182102
962459107
820629685
35180851
331...

result:

ok 19174 numbers