QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#439475#8726. Magic Showahihi12340 3ms25704kbC++144.0kb2024-06-12 00:36:142024-06-12 00:36:14

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 5
Accepted
time: 3ms = 1ms + 2ms
memory: 2004kb,25620kb

input:

1
4005

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

output:

2
5000 3298
1 4135
3 3098
4 2469
7 3776
10 2920
12 2544
13 1969
14 2757
16 4741
18 2229
18 2928
19 804
20 2387
21 1508
22 4073
23 4024
24 2924
25 782
26 401
27 4398
28 41
30 3322
31 1969
32 1600
34 2459
35 3981
36 2387
37 3212
37 4233
38 1347
40 2619
41 253
41 474
41 1323
41 1431
41 1536
41 1913
41 ...

input:

2
5000 3298
1 4135
3 3098
4 2469
7 3776
10 2920
12 2544
13 1969
14 2757
16 4741
18 2229
18 2928
19 804
20 2387
21 1508
22 4073
23 4024
24 2924
25 782
26 401
27 4398
28 41
30 3322
31 1969
32 1600
34 2459
35 3981
36 2387
37 3212
37 4233
38 1347
40 2619
41 253
41 474
41 1323
41 1431
41 1536
41 1913
41 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4005

Test #2:

score: 5
Accepted
time: 1ms = 1ms + 0ms
memory: 2004kb,25616kb

input:

1
459

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

output:

2
5000 3298
1 4135
3 3098
4 2469
7 3776
10 2920
12 2544
13 1969
14 2757
16 4741
18 2229
18 2928
19 804
20 2387
21 1508
22 4073
23 4024
24 2924
25 782
26 401
27 4398
28 41
30 3981
31 1969
32 1600
34 2459
35 3981
36 1394
37 3212
37 4233
38 1347
40 2619
41 253
41 474
41 1323
41 1431
41 1536
41 1913
41 ...

input:

2
5000 3298
1 4135
3 3098
4 2469
7 3776
10 2920
12 2544
13 1969
14 2757
16 4741
18 2229
18 2928
19 804
20 2387
21 1508
22 4073
23 4024
24 2924
25 782
26 401
27 4398
28 41
30 3981
31 1969
32 1600
34 2459
35 3981
36 1394
37 3212
37 4233
38 1347
40 2619
41 253
41 474
41 1323
41 1431
41 1536
41 1913
41 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
459

Test #3:

score: 5
Accepted
time: 1ms = 1ms + 0ms
memory: 2004kb,25620kb

input:

1
2495

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

output:

2
5000 3298
1 4135
3 3098
4 2469
7 4475
10 2920
12 2544
13 1969
14 2757
16 4741
18 2229
18 2928
19 804
20 2387
21 1508
22 4073
23 4024
24 2924
25 782
26 401
27 4398
28 41
30 3981
31 1969
32 1600
34 2459
35 3981
36 1394
37 3212
37 4233
38 1347
40 2619
41 253
41 474
41 1323
41 1431
41 1536
41 2115
41 ...

input:

2
5000 3298
1 4135
3 3098
4 2469
7 4475
10 2920
12 2544
13 1969
14 2757
16 4741
18 2229
18 2928
19 804
20 2387
21 1508
22 4073
23 4024
24 2924
25 782
26 401
27 4398
28 41
30 3981
31 1969
32 1600
34 2459
35 3981
36 1394
37 3212
37 4233
38 1347
40 2619
41 253
41 474
41 1323
41 1431
41 1536
41 2115
41 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
2495

Test #4:

score: 5
Accepted
time: 1ms = 1ms + 0ms
memory: 2004kb,25500kb

input:

3
1560

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

output:

4
5000 2500
2 395
6 4894
7 3776
8 1289
9 3250
10 2920
11 2544
12 2544
13 1969
15 858
16 4741
18 947
18 2229
18 2928
19 804
20 2387
21 1508
21 3934
22 4073
24 2924
27 4398
28 41
29 690
30 3981
31 1969
33 1760
34 2459
35 3981
36 2387
37 3212
37 3794
37 4233
41 253
41 1323
41 1431
41 1536
41 1913
41 21...

input:

4
5000 2500
2 395
6 4894
7 3776
8 1289
9 3250
10 2920
11 2544
12 2544
13 1969
15 858
16 4741
18 947
18 2229
18 2928
19 804
20 2387
21 1508
21 3934
22 4073
24 2924
27 4398
28 41
29 690
30 3981
31 1969
33 1760
34 2459
35 3981
36 2387
37 3212
37 3794
37 4233
41 253
41 1323
41 1431
41 1536
41 1913
41 21...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1560

Test #5:

score: 5
Accepted
time: 3ms = 1ms + 2ms
memory: 2004kb,25496kb

input:

3
3594

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

output:

4
5000 2500
2 395
6 4894
7 3776
8 1289
9 3250
10 2920
11 2544
12 2544
13 1969
15 858
16 4741
18 947
18 2229
18 2928
19 804
20 2387
21 1508
21 3934
22 4073
23 4024
24 2924
27 4398
28 41
29 690
30 3981
31 1969
33 1760
34 2459
36 2387
37 3212
37 3794
37 4233
41 253
41 474
41 1323
41 1536
41 1913
41 211...

input:

4
5000 2500
2 395
6 4894
7 3776
8 1289
9 3250
10 2920
11 2544
12 2544
13 1969
15 858
16 4741
18 947
18 2229
18 2928
19 804
20 2387
21 1508
21 3934
22 4073
23 4024
24 2924
27 4398
28 41
29 690
30 3981
31 1969
33 1760
34 2459
36 2387
37 3212
37 3794
37 4233
41 253
41 474
41 1323
41 1536
41 1913
41 211...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
3594

Test #6:

score: 5
Accepted
time: 0ms = 0ms + 0ms
memory: 2008kb,25500kb

input:

3
1750

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

output:

4
5000 2500
2 395
3 3098
6 4894
7 3776
8 1289
9 3250
10 2920
11 2544
12 2544
13 1969
15 858
16 4741
18 947
18 2229
18 2928
19 804
20 2387
21 1508
21 3934
22 4073
27 4398
29 690
30 3981
31 1969
33 1760
34 2459
35 3981
37 3212
37 3794
37 4233
41 253
41 1323
41 1431
41 1536
41 1913
41 2115
41 2206
41 2...

input:

4
5000 2500
2 395
3 3098
6 4894
7 3776
8 1289
9 3250
10 2920
11 2544
12 2544
13 1969
15 858
16 4741
18 947
18 2229
18 2928
19 804
20 2387
21 1508
21 3934
22 4073
27 4398
29 690
30 3981
31 1969
33 1760
34 2459
35 3981
37 3212
37 3794
37 4233
41 253
41 1323
41 1431
41 1536
41 1913
41 2115
41 2206
41 2...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1750

Test #7:

score: 5
Accepted
time: 1ms = 1ms + 0ms
memory: 2004kb,25696kb

input:

5
4878

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

output:

6
5000 2531
1 4135
2 395
3 3098
4 2469
5 2757
10 2920
13 1969
14 2757
18 2229
19 804
20 1394
21 1508
25 782
26 401
28 1275
30 3981
31 1969
32 1600
35 3981
36 2387
37 3212
37 3794
37 4939
39 4442
41 253
41 474
41 1323
41 1431
41 1913
41 2115
41 2306
41 2366
41 2558
41 2594
41 2654
41 2746
41 2769
41 ...

input:

6
5000 2531
1 4135
2 395
3 3098
4 2469
5 2757
10 2920
13 1969
14 2757
18 2229
19 804
20 1394
21 1508
25 782
26 401
28 1275
30 3981
31 1969
32 1600
35 3981
36 2387
37 3212
37 3794
37 4939
39 4442
41 253
41 474
41 1323
41 1431
41 1913
41 2115
41 2306
41 2366
41 2558
41 2594
41 2654
41 2746
41 2769
41 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4878

Test #8:

score: 5
Accepted
time: 1ms = 1ms + 0ms
memory: 2000kb,25700kb

input:

5
1223

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

output:

6
5000 2531
1 4135
2 395
3 3098
4 2469
5 2757
10 2920
13 1969
14 2757
18 2229
19 804
20 2387
21 1508
25 782
26 401
28 41
30 3322
31 1969
32 1600
35 3981
36 2387
37 3212
37 3794
37 4939
39 4442
41 253
41 474
41 1323
41 1431
41 1913
41 2206
41 2306
41 2366
41 2558
41 2594
41 2654
41 2769
41 2915
41 32...

input:

6
5000 2531
1 4135
2 395
3 3098
4 2469
5 2757
10 2920
13 1969
14 2757
18 2229
19 804
20 2387
21 1508
25 782
26 401
28 41
30 3322
31 1969
32 1600
35 3981
36 2387
37 3212
37 3794
37 4939
39 4442
41 253
41 474
41 1323
41 1431
41 1913
41 2206
41 2306
41 2366
41 2558
41 2594
41 2654
41 2769
41 2915
41 32...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1223

Test #9:

score: 5
Accepted
time: 1ms = 1ms + 0ms
memory: 2000kb,25700kb

input:

5
648

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

output:

6
5000 2531
1 4135
2 395
3 3098
4 2469
5 2757
10 2920
13 1969
14 2757
18 2229
19 804
20 2387
21 1508
25 782
26 401
28 41
30 3981
31 1969
32 1600
35 3981
36 2387
37 3212
37 3794
37 4939
39 4442
41 253
41 474
41 1323
41 1431
41 1913
41 2115
41 2206
41 2366
41 2558
41 2594
41 2654
41 2746
41 2769
41 32...

input:

6
5000 2531
1 4135
2 395
3 3098
4 2469
5 2757
10 2920
13 1969
14 2757
18 2229
19 804
20 2387
21 1508
25 782
26 401
28 41
30 3981
31 1969
32 1600
35 3981
36 2387
37 3212
37 3794
37 4939
39 4442
41 253
41 474
41 1323
41 1431
41 1913
41 2115
41 2206
41 2366
41 2558
41 2594
41 2654
41 2746
41 2769
41 32...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
648

Test #10:

score: 0
Wrong Answer
time: 3ms = 1ms + 2ms
memory: 2004kb,25212kb

input:

7
4475

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

output:

8
5000 2500
1 4135
2 271
3 3098
4 2469
5 2757
7 4475
9 2384
12 2163
14 2757
17 4800
24 2743
25 782
26 401
27 1199
28 1275
29 1198
32 1600
38 1347
39 4442
40 2619
41 3390
42 3572
46 1275
48 1519
50 3772
51 515
57 3313
58 271
60 3375
62 2163
63 4800
64 4279
65 817
66 401
71 1469
73 4279
74 2181
76 413...

input:

8
5000 2500
1 4135
2 271
3 3098
4 2469
5 2757
7 4475
9 2384
12 2163
14 2757
17 4800
24 2743
25 782
26 401
27 1199
28 1275
29 1198
32 1600
38 1347
39 4442
40 2619
41 3390
42 3572
46 1275
48 1519
50 3772
51 515
57 3313
58 271
60 3375
62 2163
63 4800
64 4279
65 817
66 401
71 1469
73 4279
74 2181
76 413...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1025

Subtask #2:

score: 0
Wrong Answer

Test #13:

score: 30
Accepted
time: 1ms = 1ms + 0ms
memory: 2004kb,25620kb

input:

1
17476204

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

output:

2
5000 3298
1 4135
3 3098
4 2469
7 4475
10 2920
12 2544
13 1969
14 2757
16 4741
18 2229
18 2928
19 804
20 2387
21 1508
22 4073
23 4024
24 2924
25 782
26 401
27 4398
28 41
30 3981
31 2347
32 1600
34 3316
35 3981
36 2387
37 3212
37 4233
38 1347
40 2619
41 46
41 253
41 474
41 863
41 1323
41 1431
41 153...

input:

2
5000 3298
1 4135
3 3098
4 2469
7 4475
10 2920
12 2544
13 1969
14 2757
16 4741
18 2229
18 2928
19 804
20 2387
21 1508
22 4073
23 4024
24 2924
25 782
26 401
27 4398
28 41
30 3981
31 2347
32 1600
34 3316
35 3981
36 2387
37 3212
37 4233
38 1347
40 2619
41 46
41 253
41 474
41 863
41 1323
41 1431
41 153...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
17476204

Test #14:

score: 30
Accepted
time: 1ms = 1ms + 0ms
memory: 2000kb,25624kb

input:

1
11926600

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

output:

2
5000 3298
1 4135
3 3098
4 2469
7 3776
10 2181
12 2544
13 2347
14 2757
16 4741
18 2229
18 2928
19 804
20 2387
21 1508
22 4073
23 4024
24 2743
25 782
26 401
27 4398
28 1275
30 3981
31 1969
32 1600
34 3316
35 3981
36 2387
37 3212
37 4233
38 1347
40 2619
41 46
41 253
41 474
41 850
41 863
41 1323
41 14...

input:

2
5000 3298
1 4135
3 3098
4 2469
7 3776
10 2181
12 2544
13 2347
14 2757
16 4741
18 2229
18 2928
19 804
20 2387
21 1508
22 4073
23 4024
24 2743
25 782
26 401
27 4398
28 1275
30 3981
31 1969
32 1600
34 3316
35 3981
36 2387
37 3212
37 4233
38 1347
40 2619
41 46
41 253
41 474
41 850
41 863
41 1323
41 14...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
11926600

Test #15:

score: 30
Accepted
time: 1ms = 1ms + 0ms
memory: 2004kb,25616kb

input:

1
16602378

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

output:

2
5000 3298
1 4135
3 3098
4 2469
7 3776
10 2920
12 2544
13 1969
14 2757
16 4741
18 2229
18 2928
19 3334
20 2387
21 1508
22 4073
23 4024
24 2924
25 782
26 401
27 4398
28 41
30 3981
31 2347
32 1600
34 3316
35 3322
36 2387
37 3212
37 4233
38 1347
40 2619
41 46
41 474
41 863
41 1431
41 1536
41 1913
41 2...

input:

2
5000 3298
1 4135
3 3098
4 2469
7 3776
10 2920
12 2544
13 1969
14 2757
16 4741
18 2229
18 2928
19 3334
20 2387
21 1508
22 4073
23 4024
24 2924
25 782
26 401
27 4398
28 41
30 3981
31 2347
32 1600
34 3316
35 3322
36 2387
37 3212
37 4233
38 1347
40 2619
41 46
41 474
41 863
41 1431
41 1536
41 1913
41 2...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
16602378

Test #16:

score: 30
Accepted
time: 0ms = 0ms + 0ms
memory: 2004kb,25496kb

input:

3
13129243

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

output:

4
5000 2500
2 395
6 4894
7 3776
8 1289
9 3250
10 2920
11 2544
12 2544
13 1969
18 947
18 2229
18 2928
19 804
20 2387
21 1508
21 3934
22 4073
23 4024
24 2924
27 4398
28 41
29 690
30 3981
31 1969
33 1760
34 2459
36 2387
37 3212
37 3794
37 4233
41 253
41 474
41 863
41 1323
41 1536
41 1913
41 2115
41 220...

input:

4
5000 2500
2 395
6 4894
7 3776
8 1289
9 3250
10 2920
11 2544
12 2544
13 1969
18 947
18 2229
18 2928
19 804
20 2387
21 1508
21 3934
22 4073
23 4024
24 2924
27 4398
28 41
29 690
30 3981
31 1969
33 1760
34 2459
36 2387
37 3212
37 3794
37 4233
41 253
41 474
41 863
41 1323
41 1536
41 1913
41 2115
41 220...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
13129243

Test #17:

score: 30
Accepted
time: 1ms = 1ms + 0ms
memory: 2000kb,25500kb

input:

3
7892141

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

output:

4
5000 2500
2 395
3 3098
5 3319
6 4894
7 3776
9 3250
11 2544
12 2544
13 1969
15 858
16 4741
18 947
18 2229
18 2928
19 804
20 2387
21 1508
21 3934
22 4073
23 4024
24 2924
27 4398
28 41
29 690
30 3981
31 1969
33 1760
34 2459
35 3981
37 3212
37 3794
37 4233
41 46
41 253
41 474
41 850
41 863
41 1323
41 ...

input:

4
5000 2500
2 395
3 3098
5 3319
6 4894
7 3776
9 3250
11 2544
12 2544
13 1969
15 858
16 4741
18 947
18 2229
18 2928
19 804
20 2387
21 1508
21 3934
22 4073
23 4024
24 2924
27 4398
28 41
29 690
30 3981
31 1969
33 1760
34 2459
35 3981
37 3212
37 3794
37 4233
41 46
41 253
41 474
41 850
41 863
41 1323
41 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
7892141

Test #18:

score: 30
Accepted
time: 3ms = 1ms + 2ms
memory: 2004kb,25500kb

input:

3
21314775

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

output:

4
5000 2500
2 395
3 3098
5 3319
6 4894
7 3776
8 1289
10 2920
11 2544
15 858
16 4741
18 947
18 2229
18 2928
20 2387
21 1508
21 3934
23 4024
24 2924
28 41
29 690
30 3981
31 1969
34 2459
35 3981
36 2387
37 3212
37 3794
37 4233
41 46
41 474
41 863
41 1323
41 1431
41 1536
41 1913
41 2115
41 2206
41 2306
...

input:

4
5000 2500
2 395
3 3098
5 3319
6 4894
7 3776
8 1289
10 2920
11 2544
15 858
16 4741
18 947
18 2229
18 2928
20 2387
21 1508
21 3934
23 4024
24 2924
28 41
29 690
30 3981
31 1969
34 2459
35 3981
36 2387
37 3212
37 3794
37 4233
41 46
41 474
41 863
41 1323
41 1431
41 1536
41 1913
41 2115
41 2206
41 2306
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
21314775

Test #19:

score: 30
Accepted
time: 1ms = 1ms + 0ms
memory: 2008kb,25704kb

input:

5
5559540

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

output:

6
5000 2531
1 4135
2 271
3 3098
4 2469
5 3319
10 2920
13 1969
14 2757
18 2229
19 3334
20 2387
21 1508
25 782
26 401
28 41
30 3322
31 2347
32 1600
35 3981
36 2387
37 3212
37 3794
37 4939
39 4442
41 46
41 474
41 850
41 1323
41 1431
41 2206
41 2366
41 2558
41 2594
41 2654
41 2746
41 2769
41 2915
41 325...

input:

6
5000 2531
1 4135
2 271
3 3098
4 2469
5 3319
10 2920
13 1969
14 2757
18 2229
19 3334
20 2387
21 1508
25 782
26 401
28 41
30 3322
31 2347
32 1600
35 3981
36 2387
37 3212
37 3794
37 4939
39 4442
41 46
41 474
41 850
41 1323
41 1431
41 2206
41 2366
41 2558
41 2594
41 2654
41 2746
41 2769
41 2915
41 325...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
5559540

Test #20:

score: 30
Accepted
time: 1ms = 1ms + 0ms
memory: 2004kb,25700kb

input:

5
9424319

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

output:

6
5000 2531
1 4135
2 271
3 3098
4 2469
5 3319
10 2920
13 2347
14 2757
18 2229
19 804
20 2387
21 1508
25 782
26 401
28 41
30 3322
31 1969
32 1600
35 3981
36 2387
37 3212
37 3794
37 4939
39 4442
41 46
41 253
41 474
41 850
41 863
41 1431
41 2206
41 2366
41 2558
41 2594
41 2654
41 2769
41 2915
41 3390
4...

input:

6
5000 2531
1 4135
2 271
3 3098
4 2469
5 3319
10 2920
13 2347
14 2757
18 2229
19 804
20 2387
21 1508
25 782
26 401
28 41
30 3322
31 1969
32 1600
35 3981
36 2387
37 3212
37 3794
37 4939
39 4442
41 46
41 253
41 474
41 850
41 863
41 1431
41 2206
41 2366
41 2558
41 2594
41 2654
41 2769
41 2915
41 3390
4...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
9424319

Test #21:

score: 30
Accepted
time: 3ms = 1ms + 2ms
memory: 2004kb,25704kb

input:

5
10955780

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

output:

6
5000 2531
1 4135
2 395
3 3098
4 2469
5 3319
10 2920
13 2347
14 2757
18 2229
19 3334
20 2387
21 1508
25 782
26 401
28 41
30 3322
31 2347
32 1600
35 3981
36 2387
37 3212
37 3794
37 4939
39 4442
41 46
41 474
41 850
41 863
41 1323
41 1431
41 1913
41 2206
41 2306
41 2366
41 2558
41 2594
41 2654
41 2746...

input:

6
5000 2531
1 4135
2 395
3 3098
4 2469
5 3319
10 2920
13 2347
14 2757
18 2229
19 3334
20 2387
21 1508
25 782
26 401
28 41
30 3322
31 2347
32 1600
35 3981
36 2387
37 3212
37 3794
37 4939
39 4442
41 46
41 474
41 850
41 863
41 1323
41 1431
41 1913
41 2206
41 2306
41 2366
41 2558
41 2594
41 2654
41 2746...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
10955780

Test #22:

score: 0
Wrong Answer
time: 1ms = 1ms + 0ms
memory: 2000kb,25208kb

input:

7
19938721

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
2990 2619
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 2619
358...

output:

8
5000 2500
1 4135
3 3098
4 2469
14 2757
17 4800
20 1394
22 4583
25 782
26 401
30 3322
32 1600
38 1347
39 4442
40 2619
42 3572
45 3930
48 1519
50 3772
54 3054
57 3313
59 775
60 3375
61 4382
62 2163
64 4279
65 817
66 401
67 1672
73 4279
74 2181
76 4135
78 712
79 2610
81 401
82 2384
83 1275
84 401
86 ...

input:

8
5000 2500
1 4135
3 3098
4 2469
14 2757
17 4800
20 1394
22 4583
25 782
26 401
30 3322
32 1600
38 1347
39 4442
40 2619
42 3572
45 3930
48 1519
50 3772
54 3054
57 3313
59 775
60 3375
61 4382
62 2163
64 4279
65 817
66 401
67 1672
73 4279
74 2181
76 4135
78 712
79 2610
81 401
82 2384
83 1275
84 401
86 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
428792

Subtask #3:

score: 0
Wrong Answer

Test #25:

score: 65
Accepted
time: 3ms = 1ms + 2ms
memory: 2000kb,25616kb

input:

1
355365355024496523

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2990 2619
886 2619
2976 260
421 260
4680 2619
3083 2619
578 2619
1501 2619
3411 260
687 2619
40 2619
4702 260
508 260
106 260
3709 2619
4543 260
637 260
3583 2619
2...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2990 2619
886 2619
2976 260
421 260
4680 2619
3083 2619
578 2619
1501 2619
3411 260
687 2619
40 2619
4702 260
508 260
106 260
3709 2619
4543 260
637 260
3583 2619
2...

output:

2
5000 3298
1 4098
3 3098
4 3252
7 3776
10 2920
12 2544
13 2347
14 3319
16 4741
18 2229
18 2928
19 804
20 2387
21 1508
22 4073
23 4024
24 2924
25 4320
26 2241
27 4398
28 41
30 3981
31 1969
32 4207
34 3316
35 3322
36 1394
37 3212
37 4233
38 4443
40 2619
41 253
41 474
41 850
41 863
41 1323
41 1536
41 ...

input:

2
5000 3298
1 4098
3 3098
4 3252
7 3776
10 2920
12 2544
13 2347
14 3319
16 4741
18 2229
18 2928
19 804
20 2387
21 1508
22 4073
23 4024
24 2924
25 4320
26 2241
27 4398
28 41
30 3981
31 1969
32 4207
34 3316
35 3322
36 1394
37 3212
37 4233
38 4443
40 2619
41 253
41 474
41 850
41 863
41 1323
41 1536
41 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
355365355024496523

Test #26:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 2004kb,25620kb

input:

1
727827999106414164

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2990 2619
886 260
2976 260
421 2619
4680 2619
3083 2619
578 260
1501 260
3411 260
687 260
40 260
4702 2619
508 260
106 260
3709 260
4543 2619
637 2619
3583 260
2205...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2990 2619
886 260
2976 260
421 2619
4680 2619
3083 2619
578 260
1501 260
3411 260
687 260
40 260
4702 2619
508 260
106 260
3709 260
4543 2619
637 2619
3583 260
2205...

output:

2
5000 3298
1 4098
3 4063
4 3252
7 3776
10 2920
12 2163
13 1969
14 3319
16 2610
18 2229
18 2928
19 3334
20 2387
21 1508
22 4583
23 4024
24 2743
25 782
26 401
27 1199
28 1275
30 3322
31 2347
32 4207
34 2459
35 3322
36 2387
37 3212
37 4233
38 1347
40 260
41 46
41 83
41 474
41 1431
41 1536
41 1913
41 1...

input:

2
5000 3298
1 4098
3 4063
4 3252
7 3776
10 2920
12 2163
13 1969
14 3319
16 2610
18 2229
18 2928
19 3334
20 2387
21 1508
22 4583
23 4024
24 2743
25 782
26 401
27 1199
28 1275
30 3322
31 2347
32 4207
34 2459
35 3322
36 2387
37 3212
37 4233
38 1347
40 260
41 46
41 83
41 474
41 1431
41 1536
41 1913
41 1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
727827999106414164

Test #27:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 2004kb,25620kb

input:

1
656410143989222955

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2990 2619
886 260
2976 2619
421 260
4680 260
3083 2619
578 2619
1501 260
3411 260
687 260
40 2619
4702 2619
508 2619
106 260
3709 260
4543 260
637 2619
3583 260
220...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2990 2619
886 260
2976 2619
421 260
4680 260
3083 2619
578 2619
1501 260
3411 260
687 260
40 2619
4702 2619
508 2619
106 260
3709 260
4543 260
637 2619
3583 260
220...

output:

2
5000 3298
1 4135
3 4063
4 3252
7 4475
10 2920
12 2544
13 2347
14 2757
16 4741
18 2229
18 2928
19 804
20 1394
21 1508
22 4583
23 4024
24 2924
25 782
26 401
27 4398
28 41
30 3322
31 2347
32 4207
34 3316
35 3322
36 1394
37 3212
37 4233
38 1347
40 2619
41 46
41 83
41 253
41 474
41 850
41 863
41 1431
4...

input:

2
5000 3298
1 4135
3 4063
4 3252
7 4475
10 2920
12 2544
13 2347
14 2757
16 4741
18 2229
18 2928
19 804
20 1394
21 1508
22 4583
23 4024
24 2924
25 782
26 401
27 4398
28 41
30 3322
31 2347
32 4207
34 3316
35 3322
36 1394
37 3212
37 4233
38 1347
40 2619
41 46
41 83
41 253
41 474
41 850
41 863
41 1431
4...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
656410143989222955

Test #28:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 2000kb,25616kb

input:

1
410366615149657534

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2990 2619
886 2619
2976 260
421 260
4680 260
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 260
106 2619
3709 260
4543 2619
637 2619
3583 260...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2990 2619
886 2619
2976 260
421 260
4680 260
3083 2619
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 2619
508 260
106 2619
3709 260
4543 2619
637 2619
3583 260...

output:

2
5000 3298
1 4098
3 3098
4 2469
7 3776
10 2181
12 2544
13 1969
14 3319
16 2610
18 2229
18 2928
19 3334
20 2387
21 1508
22 4073
23 4024
24 2743
25 4320
26 2241
27 4398
28 1275
30 3981
31 2347
32 1600
34 2459
35 3981
36 1394
37 3212
37 4233
38 1347
40 2619
41 83
41 474
41 863
41 1431
41 1536
41 1913
...

input:

2
5000 3298
1 4098
3 3098
4 2469
7 3776
10 2181
12 2544
13 1969
14 3319
16 2610
18 2229
18 2928
19 3334
20 2387
21 1508
22 4073
23 4024
24 2743
25 4320
26 2241
27 4398
28 1275
30 3981
31 2347
32 1600
34 2459
35 3981
36 1394
37 3212
37 4233
38 1347
40 2619
41 83
41 474
41 863
41 1431
41 1536
41 1913
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
410366615149657534

Test #29:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 2008kb,25616kb

input:

1
298090682780948428

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2990 2619
886 2619
2976 260
421 2619
4680 260
3083 2619
578 2619
1501 2619
3411 260
687 260
40 2619
4702 260
508 260
106 2619
3709 260
4543 2619
637 260
3583 2619
2...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2990 2619
886 2619
2976 260
421 2619
4680 260
3083 2619
578 2619
1501 2619
3411 260
687 260
40 2619
4702 260
508 260
106 2619
3709 260
4543 2619
637 260
3583 2619
2...

output:

2
5000 3298
1 4098
3 3098
4 3252
7 3776
10 2920
12 2544
13 1969
14 3319
16 2610
18 2229
18 2928
19 3334
20 2387
21 1508
22 4583
23 4024
24 2743
25 4320
26 2241
27 4398
28 1275
30 3981
31 2347
32 1600
34 3316
35 3981
36 2387
37 3212
37 4233
38 4443
40 2619
41 83
41 474
41 1536
41 1699
41 1913
41 1993...

input:

2
5000 3298
1 4098
3 3098
4 3252
7 3776
10 2920
12 2544
13 1969
14 3319
16 2610
18 2229
18 2928
19 3334
20 2387
21 1508
22 4583
23 4024
24 2743
25 4320
26 2241
27 4398
28 1275
30 3981
31 2347
32 1600
34 3316
35 3981
36 2387
37 3212
37 4233
38 4443
40 2619
41 83
41 474
41 1536
41 1699
41 1913
41 1993...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
298090682780948428

Test #30:

score: 65
Accepted
time: 0ms = 0ms + 0ms
memory: 2008kb,25504kb

input:

3
969441916331132577

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
2990 260
886 2619
2976 2619
421 2619
4680 2619
3083 260
578 260
1501 260
3411 2619
687 2619
40 260
4702 2619
508 260
106 260
3709 2619
4543 260
637 2619
3583 2619
2...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
2990 260
886 2619
2976 2619
421 2619
4680 2619
3083 260
578 260
1501 260
3411 2619
687 2619
40 260
4702 2619
508 260
106 260
3709 2619
4543 260
637 2619
3583 2619
2...

output:

4
5000 2500
1 4098
2 395
3 4063
7 3776
8 1289
11 2544
13 1969
14 3319
15 858
16 4741
17 2954
18 947
18 2229
18 2928
21 1508
21 3934
25 4320
26 2241
29 690
32 4207
33 1760
34 2459
35 3981
36 2387
37 3212
37 3794
37 4233
39 3932
40 260
41 502
41 652
41 765
41 850
41 863
41 1035
41 1323
41 1431
41 1536...

input:

4
5000 2500
1 4098
2 395
3 4063
7 3776
8 1289
11 2544
13 1969
14 3319
15 858
16 4741
17 2954
18 947
18 2229
18 2928
21 1508
21 3934
25 4320
26 2241
29 690
32 4207
33 1760
34 2459
35 3981
36 2387
37 3212
37 3794
37 4233
39 3932
40 260
41 502
41 652
41 765
41 850
41 863
41 1035
41 1323
41 1431
41 1536...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
969441916331132577

Test #31:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 2004kb,25508kb

input:

3
929489812741933634

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
2990 260
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 260
3411 260
687 260
40 260
4702 2619
508 2619
106 2619
3709 260
4543 260
637 260
3583 260
22...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
2990 260
886 2619
2976 2619
421 2619
4680 2619
3083 2619
578 2619
1501 260
3411 260
687 260
40 260
4702 2619
508 2619
106 2619
3709 260
4543 260
637 260
3583 260
22...

output:

4
5000 2500
2 271
3 4063
4 3252
5 3319
8 1289
10 2920
13 1969
17 2954
18 947
18 2229
18 2928
19 804
21 1508
21 3934
22 4073
23 4024
24 2924
28 41
31 1969
33 1760
36 2387
37 3212
37 3794
37 4233
38 4443
40 260
41 46
41 83
41 253
41 474
41 502
41 652
41 850
41 863
41 1536
41 1993
41 2031
41 2206
41 23...

input:

4
5000 2500
2 271
3 4063
4 3252
5 3319
8 1289
10 2920
13 1969
17 2954
18 947
18 2229
18 2928
19 804
21 1508
21 3934
22 4073
23 4024
24 2924
28 41
31 1969
33 1760
36 2387
37 3212
37 3794
37 4233
38 4443
40 260
41 46
41 83
41 253
41 474
41 502
41 652
41 850
41 863
41 1536
41 1993
41 2031
41 2206
41 23...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
929489812741933634

Test #32:

score: 65
Accepted
time: 0ms = 0ms + 0ms
memory: 2004kb,25512kb

input:

3
144032041325838295

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
2990 2619
886 2619
2976 2619
421 260
4680 2619
3083 260
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 260
508 2619
106 260
3709 260
4543 2619
637 260
3583 260
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
2990 2619
886 2619
2976 2619
421 260
4680 2619
3083 260
578 2619
1501 2619
3411 2619
687 2619
40 2619
4702 260
508 2619
106 260
3709 260
4543 2619
637 260
3583 260
...

output:

4
5000 2500
2 395
7 3776
11 2544
13 1969
18 947
18 2229
18 2928
20 2387
21 1508
21 3934
22 4073
24 2924
25 4320
26 2241
28 41
29 690
30 3981
31 1969
32 4207
33 1760
34 2459
35 3981
37 3212
37 3794
37 4233
38 4443
39 3932
41 83
41 502
41 1035
41 1536
41 1913
41 1997
41 2115
41 2366
41 2458
41 2746
41...

input:

4
5000 2500
2 395
7 3776
11 2544
13 1969
18 947
18 2229
18 2928
20 2387
21 1508
21 3934
22 4073
24 2924
25 4320
26 2241
28 41
29 690
30 3981
31 1969
32 4207
33 1760
34 2459
35 3981
37 3212
37 3794
37 4233
38 4443
39 3932
41 83
41 502
41 1035
41 1536
41 1913
41 1997
41 2115
41 2366
41 2458
41 2746
41...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
144032041325838295

Test #33:

score: 65
Accepted
time: 0ms = 0ms + 0ms
memory: 2004kb,25508kb

input:

3
832110946250826180

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
2990 2619
886 260
2976 260
421 260
4680 2619
3083 2619
578 260
1501 2619
3411 260
687 2619
40 2619
4702 260
508 2619
106 260
3709 2619
4543 260
637 2619
3583 2619
2...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
2990 2619
886 260
2976 260
421 260
4680 2619
3083 2619
578 260
1501 2619
3411 260
687 2619
40 2619
4702 260
508 2619
106 260
3709 2619
4543 260
637 2619
3583 2619
2...

output:

4
5000 2500
2 271
4 3252
6 4894
8 1289
10 2920
11 2544
15 858
16 4741
18 947
18 2229
18 2928
19 804
20 2387
21 1508
21 3934
22 4073
23 4024
32 4207
34 2459
35 3981
37 3212
37 3794
37 4233
41 253
41 474
41 502
41 850
41 1035
41 1431
41 1536
41 1984
41 1997
41 2206
41 2257
41 2306
41 2366
41 2458
41 2...

input:

4
5000 2500
2 271
4 3252
6 4894
8 1289
10 2920
11 2544
15 858
16 4741
18 947
18 2229
18 2928
19 804
20 2387
21 1508
21 3934
22 4073
23 4024
32 4207
34 2459
35 3981
37 3212
37 3794
37 4233
41 253
41 474
41 502
41 850
41 1035
41 1431
41 1536
41 1984
41 1997
41 2206
41 2257
41 2306
41 2366
41 2458
41 2...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
832110946250826180

Test #34:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 2004kb,25520kb

input:

3
85728715707691821

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
2990 2619
886 2619
2976 2619
421 2619
4680 260
3083 260
578 2619
1501 2619
3411 2619
687 2619
40 260
4702 260
508 2619
106 260
3709 2619
4543 260
637 2619
3583 2619...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
2990 2619
886 2619
2976 2619
421 2619
4680 260
3083 260
578 2619
1501 2619
3411 2619
687 2619
40 260
4702 260
508 2619
106 260
3709 2619
4543 260
637 2619
3583 2619...

output:

4
5000 2500
2 271
5 3319
6 4894
8 1289
11 2544
13 1969
15 858
16 4741
17 2954
18 947
18 2229
18 2928
19 804
20 2387
21 1508
21 3934
24 2924
25 4320
26 2241
28 41
30 3981
31 1969
32 4207
33 1760
34 2459
35 3981
37 3212
37 3794
37 4233
39 3932
40 260
41 46
41 253
41 502
41 765
41 987
41 1035
41 1536
4...

input:

4
5000 2500
2 271
5 3319
6 4894
8 1289
11 2544
13 1969
15 858
16 4741
17 2954
18 947
18 2229
18 2928
19 804
20 2387
21 1508
21 3934
24 2924
25 4320
26 2241
28 41
30 3981
31 1969
32 4207
33 1760
34 2459
35 3981
37 3212
37 3794
37 4233
39 3932
40 260
41 46
41 253
41 502
41 765
41 987
41 1035
41 1536
4...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
85728715707691821

Test #35:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 2004kb,25700kb

input:

5
777434612360931036

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
2990 2619
886 260
2976 260
421 2619
4680 260
3083 2619
578 260
1501 2619
3411 260
687 2619
40 260
4702 2619
508 260
106 2619
3709 260
4543 2619
637 260
3583 2619
22...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
2990 2619
886 260
2976 260
421 2619
4680 260
3083 2619
578 260
1501 2619
3411 260
687 2619
40 260
4702 2619
508 260
106 2619
3709 260
4543 2619
637 260
3583 2619
22...

output:

6
5000 2531
1 4098
2 395
3 3098
4 3252
5 2757
10 2920
13 2347
14 3319
18 2229
19 3334
20 1394
21 1508
25 782
26 401
28 1275
30 3981
31 2347
32 1600
35 3981
36 2387
37 3212
37 3794
37 4939
39 4442
41 83
41 474
41 863
41 987
41 1699
41 1913
41 1984
41 2031
41 2115
41 2206
41 2257
41 2366
41 2558
41 25...

input:

6
5000 2531
1 4098
2 395
3 3098
4 3252
5 2757
10 2920
13 2347
14 3319
18 2229
19 3334
20 1394
21 1508
25 782
26 401
28 1275
30 3981
31 2347
32 1600
35 3981
36 2387
37 3212
37 3794
37 4939
39 4442
41 83
41 474
41 863
41 987
41 1699
41 1913
41 1984
41 2031
41 2115
41 2206
41 2257
41 2366
41 2558
41 25...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
777434612360931036

Test #36:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 2004kb,25696kb

input:

5
705262511549880222

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
2990 2619
886 260
2976 260
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 260
687 260
40 260
4702 260
508 2619
106 260
3709 260
4543 2619
637 260
3583 2619
22...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
2990 2619
886 260
2976 260
421 2619
4680 2619
3083 2619
578 2619
1501 2619
3411 260
687 260
40 260
4702 260
508 2619
106 260
3709 260
4543 2619
637 260
3583 2619
22...

output:

6
5000 2531
1 4135
2 271
3 3098
4 3252
5 3319
10 2181
13 1969
14 2757
18 2229
19 804
20 2387
21 1508
25 782
26 401
28 1275
30 3981
31 2347
32 4207
35 3981
36 1394
37 3212
37 3794
37 4939
39 4442
41 46
41 83
41 253
41 502
41 765
41 863
41 1035
41 1431
41 1881
41 1984
41 1993
41 2031
41 2115
41 2206
4...

input:

6
5000 2531
1 4135
2 271
3 3098
4 3252
5 3319
10 2181
13 1969
14 2757
18 2229
19 804
20 2387
21 1508
25 782
26 401
28 1275
30 3981
31 2347
32 4207
35 3981
36 1394
37 3212
37 3794
37 4939
39 4442
41 46
41 83
41 253
41 502
41 765
41 863
41 1035
41 1431
41 1881
41 1984
41 1993
41 2031
41 2115
41 2206
4...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
705262511549880222

Test #37:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 2004kb,25696kb

input:

5
510318082834167951

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
2990 2619
886 260
2976 2619
421 2619
4680 2619
3083 260
578 260
1501 2619
3411 2619
687 2619
40 2619
4702 260
508 260
106 260
3709 2619
4543 2619
637 2619
3583 260
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
2990 2619
886 260
2976 2619
421 2619
4680 2619
3083 260
578 260
1501 2619
3411 2619
687 2619
40 2619
4702 260
508 260
106 260
3709 2619
4543 2619
637 2619
3583 260
...

output:

6
5000 2531
1 4098
2 395
3 3098
4 2469
5 2757
10 2920
13 2347
14 3319
18 2229
19 804
20 1394
21 1508
25 4320
26 2241
28 41
30 3322
31 1969
32 4207
35 3322
36 2387
37 3212
37 3794
37 4939
39 3932
41 253
41 502
41 1035
41 1323
41 1431
41 1913
41 1984
41 2206
41 2257
41 2306
41 2366
41 2458
41 2558
41 ...

input:

6
5000 2531
1 4098
2 395
3 3098
4 2469
5 2757
10 2920
13 2347
14 3319
18 2229
19 804
20 1394
21 1508
25 4320
26 2241
28 41
30 3322
31 1969
32 4207
35 3322
36 2387
37 3212
37 3794
37 4939
39 3932
41 253
41 502
41 1035
41 1323
41 1431
41 1913
41 1984
41 2206
41 2257
41 2306
41 2366
41 2458
41 2558
41 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
510318082834167951

Test #38:

score: 65
Accepted
time: 3ms = 1ms + 2ms
memory: 2004kb,25700kb

input:

5
914858813253258744

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
2990 2619
886 260
2976 260
421 260
4680 260
3083 260
578 260
1501 260
3411 260
687 2619
40 2619
4702 260
508 2619
106 2619
3709 260
4543 2619
637 2619
3583 260
2205...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
2990 2619
886 260
2976 260
421 260
4680 260
3083 260
578 260
1501 260
3411 260
687 2619
40 2619
4702 260
508 2619
106 2619
3709 260
4543 2619
637 2619
3583 260
2205...

output:

6
5000 2531
1 4135
2 271
3 4063
4 3252
5 2757
10 2181
13 2347
14 2757
18 2229
19 804
20 2387
21 1508
25 782
26 401
28 41
30 3322
31 2347
32 1600
35 3322
36 1394
37 3212
37 3794
37 4939
39 4442
41 83
41 253
41 474
41 850
41 863
41 987
41 1323
41 1431
41 1984
41 1997
41 2206
41 2257
41 2306
41 2366
41...

input:

6
5000 2531
1 4135
2 271
3 4063
4 3252
5 2757
10 2181
13 2347
14 2757
18 2229
19 804
20 2387
21 1508
25 782
26 401
28 41
30 3322
31 2347
32 1600
35 3322
36 1394
37 3212
37 3794
37 4939
39 4442
41 83
41 253
41 474
41 850
41 863
41 987
41 1323
41 1431
41 1984
41 1997
41 2206
41 2257
41 2306
41 2366
41...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
914858813253258744

Test #39:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 2004kb,25700kb

input:

5
659635316746638238

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
2990 2619
886 260
2976 2619
421 260
4680 260
3083 2619
578 260
1501 2619
3411 2619
687 2619
40 260
4702 260
508 260
106 2619
3709 2619
4543 260
637 260
3583 260
220...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
2990 2619
886 260
2976 2619
421 260
4680 260
3083 2619
578 260
1501 2619
3411 2619
687 2619
40 260
4702 260
508 260
106 2619
3709 2619
4543 260
637 260
3583 260
220...

output:

6
5000 2531
1 4098
2 395
3 3098
4 2469
5 3319
10 2920
13 2347
14 3319
18 2229
19 3334
20 2387
21 1508
25 4320
26 2241
28 41
30 3322
31 1969
32 1600
35 3322
36 1394
37 3212
37 3794
37 4939
39 3932
41 46
41 474
41 502
41 863
41 987
41 1323
41 1881
41 1913
41 1984
41 1997
41 2031
41 2257
41 2306
41 255...

input:

6
5000 2531
1 4098
2 395
3 3098
4 2469
5 3319
10 2920
13 2347
14 3319
18 2229
19 3334
20 2387
21 1508
25 4320
26 2241
28 41
30 3322
31 1969
32 1600
35 3322
36 1394
37 3212
37 3794
37 4939
39 3932
41 46
41 474
41 502
41 863
41 987
41 1323
41 1881
41 1913
41 1984
41 1997
41 2031
41 2257
41 2306
41 255...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
659635316746638238

Test #40:

score: 0
Wrong Answer
time: 1ms = 1ms + 0ms
memory: 2004kb,25196kb

input:

7
858490260563149759

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
2990 2619
886 260
2976 260
421 260
4680 2619
3083 260
578 260
1501 2619
3411 2619
687 260
40 260
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 260
3583 2619
2...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
2990 2619
886 260
2976 260
421 260
4680 2619
3083 260
578 260
1501 2619
3411 2619
687 260
40 260
4702 2619
508 2619
106 2619
3709 2619
4543 2619
637 260
3583 2619
2...

output:

8
5000 2500
1 4135
2 271
3 3098
4 2469
7 4475
10 2181
11 2163
13 2347
14 2757
15 2670
16 2610
19 3334
24 2743
25 782
26 401
28 1275
29 1198
32 1600
33 415
34 3316
36 1394
39 4442
41 474
42 3572
47 1199
50 3772
51 775
52 1672
53 3413
55 1543
57 3313
59 775
62 2163
64 4279
65 817
66 401
71 1469
73 427...

input:

8
5000 2500
1 4135
2 271
3 3098
4 2469
7 4475
10 2181
11 2163
13 2347
14 2757
15 2670
16 2610
19 3334
24 2743
25 782
26 401
28 1275
29 1198
32 1600
33 415
34 3316
36 1394
39 4442
41 474
42 3572
47 1199
50 3772
51 775
52 1672
53 3413
55 1543
57 3313
59 775
62 2163
64 4279
65 817
66 401
71 1469
73 427...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
815455552894382673