QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#212006#6640. Talk That Talkucup-team241#TL 1675ms49556kbC++143.0kb2023-10-13 05:02:592023-10-13 05:03:00

詳細信息

Test #1:

score: 100
Accepted
time: 882ms
memory: 49556kb

input:

7
7 32
13 1
13 2
67 11
2003 44
1000003 1984
999999999989 987654

output:

0
2
2
146
21510
495014784
246913256130162788

result:

ok 7 numbers

Test #2:

score: 0
Accepted
time: 179ms
memory: 3568kb

input:

11696
5 1
5 2
7 1
7 2
7 3
11 1
11 2
11 3
11 4
11 5
13 1
13 2
13 3
13 4
13 5
13 6
17 1
17 2
17 3
17 4
17 5
17 6
17 7
17 8
19 1
19 2
19 3
19 4
19 5
19 6
19 7
19 8
19 9
23 1
23 2
23 3
23 4
23 5
23 6
23 7
23 8
23 9
23 10
23 11
29 1
29 2
29 3
29 4
29 5
29 6
29 7
29 8
29 9
29 10
29 11
29 12
29 13
29 14
31...

output:

0
0
0
0
0
2
4
4
6
6
2
2
4
4
4
4
2
4
4
6
6
6
8
8
4
8
10
12
16
18
18
20
20
4
8
12
16
20
22
24
24
24
24
24
6
12
18
24
24
28
32
36
40
40
40
44
44
44
6
12
18
22
26
32
34
36
42
44
44
46
46
46
46
8
14
22
26
32
38
42
44
52
54
56
60
62
62
64
64
64
64
8
16
20
28
34
38
44
52
54
56
60
64
66
68
70
74
74
74
76
76...

result:

ok 11696 numbers

Test #3:

score: 0
Accepted
time: 247ms
memory: 3448kb

input:

500000
71 1
41 1
67 1
17 1
29 1
97 1
11 1
59 1
89 1
71 1
7 1
31 1
71 1
13 1
67 1
97 1
13 1
37 1
29 1
13 1
67 1
37 1
97 1
59 1
89 1
83 1
73 1
29 1
13 1
89 1
17 1
43 1
31 1
37 1
79 1
41 1
23 1
83 1
7 1
19 1
11 1
67 1
73 1
71 1
67 1
17 1
47 1
17 1
29 1
41 1
97 1
13 1
47 1
43 1
23 1
7 1
73 1
13 1
47 1
7...

output:

16
8
16
2
6
22
2
14
20
16
0
6
16
2
16
22
2
8
6
2
16
8
22
14
20
20
16
6
2
20
2
10
6
8
18
8
4
20
0
4
2
16
16
16
16
2
10
2
6
8
22
2
10
10
4
0
16
2
10
0
2
20
6
8
14
16
16
2
14
12
2
8
16
0
16
0
18
2
2
4
16
14
16
2
2
22
14
20
20
10
16
16
22
14
16
14
18
0
20
6
2
16
10
4
14
2
22
4
20
2
18
0
6
20
2
4
14
0
12...

result:

ok 500000 numbers

Test #4:

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

input:

500000
796985057191 1
567957900049 1
827610855103 1
919580142883 1
705957627181 1
854537570797 1
653636687779 1
516224177893 1
616020013397 1
518523794483 1
904311938423 1
534402190409 1
578460069899 1
754072383349 1
556038395257 1
676067642057 1
759949674839 1
913727773951 1
792376257731 1
51332043...

output:

199246264296
141989475010
206902713774
229895035720
176489406794
213634392698
163409171944
129056044472
154005003348
129630948620
226077984604
133600547600
144615017474
188518095836
139009598812
169016910512
189987418708
228431943486
198094064432
128330108024
213838430616
148581110810
138371413484
1...

result:

ok 500000 numbers

Test #5:

score: 0
Accepted
time: 1675ms
memory: 3448kb

input:

500000
4630931 1
532378711517 2
897492424691 1
933429720763 2
50396453 1
965938979207 1
757130529707 1
585648391093 2
93206693 1
582531600551 1
902156055859 1
673348731047 1
43627163 2
786341452943 1
630094950481 2
500747394781 2
55003589 2
662875627321 2
554939202737 2
729610579949 1
48444437 2
644...

output:

1157732
266189355756
224373106172
466714860380
12599112
241484744800
189282632426
292824195542
23301672
145632900136
225539013964
168337182760
21813580
196585363234
315047475234
250373697386
27501792
331437813654
277469601364
182402644986
24222216
161182653834
403691568340
409143875612
24208052
1779...

result:

ok 500000 numbers

Test #6:

score: -100
Time Limit Exceeded

input:

500000
999999769291 2
999999916099 2
999999337661 2
999999619897 2
999999711979 2
999999125599 2
999999617677 2
999999902791 2
999999704749 2
999999640721 2
999999284629 2
999999430669 2
999999876917 2
999999555559 2
999999545273 2
999999426997 2
999999814963 2
999999272717 2
999999621109 2
99999955...

output:

499999884644
499999958048
499999668828
499999809942
499999855988
499999562796
499999808834
499999951392
499999852370
499999820356
499999642310
499999715330
499999938456
499999777776
499999772632
499999713494
499999907480
499999636356
499999810550
499999775204
499999646592
499999695462
499999792794
4...

result: