QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#439472#8726. Magic Showahihi12340 4ms26112kbC++144.0kb2024-06-12 00:34:102024-06-12 00:34:12

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 5
Accepted
time: 1ms = 1ms + 0ms
memory: 2012kb,26104kb

input:

1
4005

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

output:

2
5000 4928
1 4063
2 59
3 855
4 2444
5 3477
6 170
6 698
6 1441
6 3339
6 4017
6 4246
7 1300
8 613
9 3339
10 893
11 3516
12 170
13 59
14 1892
15 1100
16 3710
17 2998
18 87
19 2828
20 1200
21 3786
22 2169
23 4243
24 2828
25 1171
26 843
27 560
28 1410
29 4455
30 140
31 451
32 4427
33 1786
34 4607
35 232...

input:

2
5000 4928
1 4063
2 59
3 855
4 2444
5 3477
6 170
6 698
6 1441
6 3339
6 4017
6 4246
7 1300
8 613
9 3339
10 893
11 3516
12 170
13 59
14 1892
15 1100
16 3710
17 2998
18 87
19 2828
20 1200
21 3786
22 2169
23 4243
24 2828
25 1171
26 843
27 560
28 1410
29 4455
30 140
31 451
32 4427
33 1786
34 4607
35 232...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4005

Test #2:

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

input:

1
459

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

output:

2
5000 4928
1 4063
2 1110
3 855
4 2444
5 3477
6 170
6 698
6 1441
6 3339
6 4017
6 4246
7 1300
8 613
9 3339
10 893
11 3516
12 170
13 59
14 1892
15 1100
16 3710
17 2998
18 87
19 2828
20 1200
21 3786
22 2169
23 4243
24 2828
25 1171
26 843
27 560
28 1410
29 4455
30 140
31 451
32 4427
33 1786
34 4607
35 2...

input:

2
5000 4928
1 4063
2 1110
3 855
4 2444
5 3477
6 170
6 698
6 1441
6 3339
6 4017
6 4246
7 1300
8 613
9 3339
10 893
11 3516
12 170
13 59
14 1892
15 1100
16 3710
17 2998
18 87
19 2828
20 1200
21 3786
22 2169
23 4243
24 2828
25 1171
26 843
27 560
28 1410
29 4455
30 140
31 451
32 4427
33 1786
34 4607
35 2...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
459

Test #3:

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

input:

1
2495

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

output:

2
5000 4928
1 4063
2 1110
3 855
4 2444
5 3477
6 170
6 698
6 1441
6 3339
6 4017
6 4246
7 1300
8 3710
9 3339
10 893
11 4303
12 170
13 59
14 1892
15 1100
16 3710
17 2998
18 87
19 2828
20 1200
21 3786
22 2169
23 4243
24 2828
25 1171
26 843
27 560
28 1410
29 4455
30 140
31 451
32 4427
33 1786
34 4607
35 ...

input:

2
5000 4928
1 4063
2 1110
3 855
4 2444
5 3477
6 170
6 698
6 1441
6 3339
6 4017
6 4246
7 1300
8 3710
9 3339
10 893
11 4303
12 170
13 59
14 1892
15 1100
16 3710
17 2998
18 87
19 2828
20 1200
21 3786
22 2169
23 4243
24 2828
25 1171
26 843
27 560
28 1410
29 4455
30 140
31 451
32 4427
33 1786
34 4607
35 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
2495

Test #4:

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

input:

3
1560

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

output:

4
5000 2500
1 4063
2 1110
3 855
5 3477
6 1441
6 3339
6 4017
6 4246
7 1300
8 613
9 3339
11 3516
13 59
19 2828
20 1200
21 3786
23 4243
24 2828
26 843
27 560
29 4455
30 140
32 4427
33 1786
35 2327
36 2227
37 855
38 3980
39 1200
42 4684
44 3980
45 2327
47 840
50 3291
55 2227
56 59
57 1298
58 1296
59 83
...

input:

4
5000 2500
1 4063
2 1110
3 855
5 3477
6 1441
6 3339
6 4017
6 4246
7 1300
8 613
9 3339
11 3516
13 59
19 2828
20 1200
21 3786
23 4243
24 2828
26 843
27 560
29 4455
30 140
32 4427
33 1786
35 2327
36 2227
37 855
38 3980
39 1200
42 4684
44 3980
45 2327
47 840
50 3291
55 2227
56 59
57 1298
58 1296
59 83
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1560

Test #5:

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

input:

3
3594

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

output:

4
5000 2500
2 1110
3 855
5 3477
6 1441
6 3339
6 4017
6 4246
7 1300
8 613
9 3339
11 3516
13 59
19 2828
20 1200
21 3786
23 4243
24 2828
26 843
27 560
29 4455
30 140
32 4427
33 1786
35 2327
36 2227
37 855
38 3980
39 1200
40 4246
42 4684
44 3980
45 2327
47 840
50 3291
55 2227
56 59
57 1298
58 1296
59 83...

input:

4
5000 2500
2 1110
3 855
5 3477
6 1441
6 3339
6 4017
6 4246
7 1300
8 613
9 3339
11 3516
13 59
19 2828
20 1200
21 3786
23 4243
24 2828
26 843
27 560
29 4455
30 140
32 4427
33 1786
35 2327
36 2227
37 855
38 3980
39 1200
40 4246
42 4684
44 3980
45 2327
47 840
50 3291
55 2227
56 59
57 1298
58 1296
59 83...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
3594

Test #6:

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

input:

3
1750

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

output:

4
5000 2500
1 4063
2 1110
3 855
5 3477
6 1441
6 3339
6 4017
6 4246
7 1300
8 613
9 3339
11 3516
13 59
19 2828
20 1200
21 3786
23 4243
24 2828
26 843
27 560
29 4455
30 140
32 4427
33 1786
35 2327
36 2227
37 855
39 1200
42 4684
44 3980
45 2327
47 840
50 3291
55 2227
56 59
57 1298
58 1296
59 83
59 174
5...

input:

4
5000 2500
1 4063
2 1110
3 855
5 3477
6 1441
6 3339
6 4017
6 4246
7 1300
8 613
9 3339
11 3516
13 59
19 2828
20 1200
21 3786
23 4243
24 2828
26 843
27 560
29 4455
30 140
32 4427
33 1786
35 2327
36 2227
37 855
39 1200
42 4684
44 3980
45 2327
47 840
50 3291
55 2227
56 59
57 1298
58 1296
59 83
59 174
5...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1750

Test #7:

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

input:

5
4878

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

output:

6
5000 2530
4 2444
5 1892
6 4017
7 667
9 3339
11 3516
12 170
14 1892
15 1100
18 87
26 843
27 560
29 3625
32 4427
33 1786
34 4607
35 2327
40 4246
42 2045
45 2327
46 3625
47 840
48 1615
49 1958
50 3291
52 2045
54 3718
57 1298
58 1296
59 2846
62 1786
63 4427
64 182
64 617
64 731
64 738
64 856
64 1140
6...

input:

6
5000 2530
4 2444
5 1892
6 4017
7 667
9 3339
11 3516
12 170
14 1892
15 1100
18 87
26 843
27 560
29 3625
32 4427
33 1786
34 4607
35 2327
40 4246
42 2045
45 2327
46 3625
47 840
48 1615
49 1958
50 3291
52 2045
54 3718
57 1298
58 1296
59 2846
62 1786
63 4427
64 182
64 617
64 731
64 738
64 856
64 1140
6...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4878

Test #8:

score: 5
Accepted
time: 0ms = 0ms + 0ms
memory: 2012kb,25516kb

input:

5
1223

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

output:

6
5000 2530
4 2444
5 3477
6 4017
7 1300
9 3339
11 3516
12 170
14 1892
15 1100
18 87
26 843
27 560
29 4455
32 4427
33 1786
34 4607
35 2327
40 4246
42 4684
45 2327
46 3625
47 840
48 1615
49 1958
50 3291
52 2045
54 3718
57 1298
58 1296
59 2846
62 1786
63 4427
64 182
64 226
64 617
64 731
64 738
64 856
6...

input:

6
5000 2530
4 2444
5 3477
6 4017
7 1300
9 3339
11 3516
12 170
14 1892
15 1100
18 87
26 843
27 560
29 4455
32 4427
33 1786
34 4607
35 2327
40 4246
42 4684
45 2327
46 3625
47 840
48 1615
49 1958
50 3291
52 2045
54 3718
57 1298
58 1296
59 2846
62 1786
63 4427
64 182
64 226
64 617
64 731
64 738
64 856
6...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1223

Test #9:

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

input:

5
648

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

output:

6
5000 2530
4 2444
5 3477
6 4017
7 1300
9 3339
11 3516
12 170
14 1892
15 1100
18 87
26 843
27 2992
29 4455
32 4427
33 1786
34 4607
35 2327
40 4246
42 4684
45 1811
46 3625
47 840
48 1615
49 1958
50 3291
52 2045
54 3718
57 1298
58 1296
59 2846
62 1786
63 87
64 182
64 226
64 617
64 731
64 738
64 856
64...

input:

6
5000 2530
4 2444
5 3477
6 4017
7 1300
9 3339
11 3516
12 170
14 1892
15 1100
18 87
26 843
27 2992
29 4455
32 4427
33 1786
34 4607
35 2327
40 4246
42 4684
45 1811
46 3625
47 840
48 1615
49 1958
50 3291
52 2045
54 3718
57 1298
58 1296
59 2846
62 1786
63 87
64 182
64 226
64 617
64 731
64 738
64 856
64...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
648

Test #10:

score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 2008kb,25204kb

input:

7
4475

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

output:

8
5000 2500
4 2444
10 893
11 4303
12 170
13 59
14 1892
15 1100
16 3710
17 2998
18 87
22 2169
25 1171
28 1410
31 451
34 4607
41 1937
43 335
46 3625
48 1615
49 1958
51 3155
52 2045
53 2067
54 3718
56 59
58 1958
59 83
59 174
59 296
59 344
59 796
59 817
59 864
59 1096
59 1118
59 1174
59 1778
59 2150
59 ...

input:

8
5000 2500
4 2444
10 893
11 4303
12 170
13 59
14 1892
15 1100
16 3710
17 2998
18 87
22 2169
25 1171
28 1410
31 451
34 4607
41 1937
43 335
46 3625
48 1615
49 1958
51 3155
52 2045
53 2067
54 3718
56 59
58 1958
59 83
59 174
59 296
59 344
59 796
59 817
59 864
59 1096
59 1118
59 1174
59 1778
59 2150
59 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1

Subtask #2:

score: 0
Wrong Answer

Test #13:

score: 30
Accepted
time: 0ms = 0ms + 0ms
memory: 2012kb,26112kb

input:

1
17476204

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

output:

2
5000 4928
1 4063
2 1110
3 474
4 2444
5 3477
6 170
6 698
6 1441
6 3339
6 4017
6 4246
7 1300
8 613
9 170
10 893
11 4303
12 3339
13 59
14 1892
15 1100
16 3710
17 2998
18 87
19 2828
20 1200
21 3786
22 2169
23 4243
24 2828
25 1171
26 843
27 560
28 1410
29 4455
30 893
31 451
32 4427
33 1786
34 2871
35 2...

input:

2
5000 4928
1 4063
2 1110
3 474
4 2444
5 3477
6 170
6 698
6 1441
6 3339
6 4017
6 4246
7 1300
8 613
9 170
10 893
11 4303
12 3339
13 59
14 1892
15 1100
16 3710
17 2998
18 87
19 2828
20 1200
21 3786
22 2169
23 4243
24 2828
25 1171
26 843
27 560
28 1410
29 4455
30 893
31 451
32 4427
33 1786
34 2871
35 2...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
17476204

Test #14:

score: 30
Accepted
time: 2ms = 0ms + 2ms
memory: 2008kb,26104kb

input:

1
11926600

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

output:

2
5000 4928
1 4063
2 1110
3 474
4 2328
5 3477
6 170
6 698
6 1441
6 3339
6 4017
6 4246
7 1300
8 613
9 3339
10 893
11 3516
12 3339
13 59
14 1892
15 1100
16 3710
17 2998
18 87
19 1338
20 1200
21 3786
22 2169
23 4243
24 2828
25 1171
26 843
27 560
28 1410
29 4455
30 140
31 451
32 4427
33 1786
34 4607
35 ...

input:

2
5000 4928
1 4063
2 1110
3 474
4 2328
5 3477
6 170
6 698
6 1441
6 3339
6 4017
6 4246
7 1300
8 613
9 3339
10 893
11 3516
12 3339
13 59
14 1892
15 1100
16 3710
17 2998
18 87
19 1338
20 1200
21 3786
22 2169
23 4243
24 2828
25 1171
26 843
27 560
28 1410
29 4455
30 140
31 451
32 4427
33 1786
34 4607
35 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
11926600

Test #15:

score: 30
Accepted
time: 0ms = 0ms + 0ms
memory: 2012kb,25592kb

input:

1
16602378

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

output:

2
5000 3087
1 3540
2 1110
3 474
4 2444
5 3477
6 170
6 698
6 3339
6 4246
9 3339
10 893
11 3516
12 3339
13 59
14 1892
15 1100
16 3710
17 2998
19 2828
20 1200
21 2156
23 4243
25 1171
27 560
30 140
33 3011
34 2871
35 2327
36 3790
37 855
39 1200
40 4246
41 1937
42 4684
43 335
44 3980
45 2327
47 840
48 16...

input:

2
5000 3087
1 3540
2 1110
3 474
4 2444
5 3477
6 170
6 698
6 3339
6 4246
9 3339
10 893
11 3516
12 3339
13 59
14 1892
15 1100
16 3710
17 2998
19 2828
20 1200
21 2156
23 4243
25 1171
27 560
30 140
33 3011
34 2871
35 2327
36 3790
37 855
39 1200
40 4246
41 1937
42 4684
43 335
44 3980
45 2327
47 840
48 16...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
16602378

Test #16:

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

input:

3
13129243

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

output:

4
5000 2500
2 1110
3 855
5 3477
6 1441
6 3339
6 4017
6 4246
7 1300
8 613
11 3516
12 3339
13 59
19 2828
21 3786
23 4243
26 843
27 560
29 4455
30 140
32 4427
33 1786
34 2871
35 2327
36 2227
38 3980
39 1200
40 4246
42 4684
44 3980
45 2327
47 840
50 3291
55 2227
56 59
57 1298
58 1296
59 83
59 174
59 344...

input:

4
5000 2500
2 1110
3 855
5 3477
6 1441
6 3339
6 4017
6 4246
7 1300
8 613
11 3516
12 3339
13 59
19 2828
21 3786
23 4243
26 843
27 560
29 4455
30 140
32 4427
33 1786
34 2871
35 2327
36 2227
38 3980
39 1200
40 4246
42 4684
44 3980
45 2327
47 840
50 3291
55 2227
56 59
57 1298
58 1296
59 83
59 174
59 344...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
13129243

Test #17:

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

input:

3
7892141

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

output:

4
5000 2500
1 4063
2 1110
3 855
4 2328
5 3477
6 1441
6 3339
6 4017
6 4246
7 1300
9 3339
11 3516
12 3339
13 59
20 1200
21 3786
23 4243
24 2828
26 843
27 560
29 4455
30 140
32 4427
33 1786
36 2227
37 855
39 1200
40 4246
42 4684
45 2327
47 840
55 2227
56 59
57 1298
58 1296
59 83
59 174
59 344
59 389
59...

input:

4
5000 2500
1 4063
2 1110
3 855
4 2328
5 3477
6 1441
6 3339
6 4017
6 4246
7 1300
9 3339
11 3516
12 3339
13 59
20 1200
21 3786
23 4243
24 2828
26 843
27 560
29 4455
30 140
32 4427
33 1786
36 2227
37 855
39 1200
40 4246
42 4684
45 2327
47 840
55 2227
56 59
57 1298
58 1296
59 83
59 174
59 344
59 389
59...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
7892141

Test #18:

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

input:

3
21314775

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

output:

4
5000 2500
1 4063
2 59
3 855
4 2328
5 3477
6 1441
6 3339
6 4017
6 4246
7 1300
8 613
9 3339
11 3516
12 3339
13 59
19 2828
20 1200
21 3786
23 4243
24 2828
27 560
29 4455
30 140
33 1786
34 2871
35 2327
36 2227
37 855
38 3980
40 4246
42 4684
44 3980
45 2327
47 840
50 3291
55 2227
56 59
57 1298
59 83
59...

input:

4
5000 2500
1 4063
2 59
3 855
4 2328
5 3477
6 1441
6 3339
6 4017
6 4246
7 1300
8 613
9 3339
11 3516
12 3339
13 59
19 2828
20 1200
21 3786
23 4243
24 2828
27 560
29 4455
30 140
33 1786
34 2871
35 2327
36 2227
37 855
38 3980
40 4246
42 4684
44 3980
45 2327
47 840
50 3291
55 2227
56 59
57 1298
59 83
59...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
21314775

Test #19:

score: 30
Accepted
time: 0ms = 0ms + 0ms
memory: 2012kb,25512kb

input:

5
5559540

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

output:

6
5000 2530
4 2328
5 3477
6 4017
7 1300
9 3339
11 4303
12 170
14 1892
15 1100
18 87
26 843
27 560
29 4455
32 4427
33 1786
34 4607
35 2327
40 4246
42 4684
45 2327
46 3625
47 840
48 1615
49 1958
50 3291
52 2045
54 3718
57 1298
58 1296
59 2846
62 1786
63 87
64 182
64 226
64 731
64 784
64 856
64 1109
64...

input:

6
5000 2530
4 2328
5 3477
6 4017
7 1300
9 3339
11 4303
12 170
14 1892
15 1100
18 87
26 843
27 560
29 4455
32 4427
33 1786
34 4607
35 2327
40 4246
42 4684
45 2327
46 3625
47 840
48 1615
49 1958
50 3291
52 2045
54 3718
57 1298
58 1296
59 2846
62 1786
63 87
64 182
64 226
64 731
64 784
64 856
64 1109
64...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
5559540

Test #20:

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

input:

5
9424319

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

output:

6
5000 2530
4 2328
5 3477
6 4017
7 1300
9 3339
11 4303
12 3339
14 1892
15 1100
18 87
26 808
27 560
29 4455
32 87
33 3011
34 4607
35 2327
40 4246
42 4684
45 2327
46 3625
47 840
48 1615
49 1958
50 3291
52 2045
54 3718
57 1298
58 1296
59 2846
62 1786
63 87
64 182
64 226
64 356
64 617
64 731
64 738
64 7...

input:

6
5000 2530
4 2328
5 3477
6 4017
7 1300
9 3339
11 4303
12 3339
14 1892
15 1100
18 87
26 808
27 560
29 4455
32 87
33 3011
34 4607
35 2327
40 4246
42 4684
45 2327
46 3625
47 840
48 1615
49 1958
50 3291
52 2045
54 3718
57 1298
58 1296
59 2846
62 1786
63 87
64 182
64 226
64 356
64 617
64 731
64 738
64 7...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
9424319

Test #21:

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

input:

5
10955780

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

output:

6
5000 2530
4 2328
5 3477
6 4017
7 1300
9 3339
11 3516
12 3339
14 1892
15 1100
18 87
26 808
27 560
29 4455
32 87
33 1786
34 4607
35 2327
40 4246
42 4684
45 2327
46 3625
47 840
48 1615
49 1958
50 3291
52 2045
54 3718
57 1298
58 1296
59 2846
62 3011
63 4427
64 182
64 226
64 356
64 617
64 731
64 784
64...

input:

6
5000 2530
4 2328
5 3477
6 4017
7 1300
9 3339
11 3516
12 3339
14 1892
15 1100
18 87
26 808
27 560
29 4455
32 87
33 1786
34 4607
35 2327
40 4246
42 4684
45 2327
46 3625
47 840
48 1615
49 1958
50 3291
52 2045
54 3718
57 1298
58 1296
59 2846
62 3011
63 4427
64 182
64 226
64 356
64 617
64 731
64 784
64...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
10955780

Test #22:

score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 2008kb,25212kb

input:

7
19938721

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
1948 893
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 893
2342 893
1053 893
1142 893
2109 893
342 893
3952 893
...

output:

8
5000 2500
5 1892
7 667
10 893
13 59
14 1892
15 1100
16 3710
17 2998
18 87
20 1200
22 2169
23 4211
25 1171
27 2992
28 1410
29 3625
31 451
41 1937
42 2045
43 335
45 1811
46 3625
48 1615
49 1958
51 3155
52 2045
53 2067
54 3718
56 59
59 83
59 174
59 279
59 344
59 666
59 796
59 817
59 864
59 1096
59 11...

input:

8
5000 2500
5 1892
7 667
10 893
13 59
14 1892
15 1100
16 3710
17 2998
18 87
20 1200
22 2169
23 4211
25 1171
27 2992
28 1410
29 3625
31 451
41 1937
42 2045
43 335
45 1811
46 3625
48 1615
49 1958
51 3155
52 2045
53 2067
54 3718
56 59
59 83
59 174
59 279
59 344
59 666
59 796
59 817
59 864
59 1096
59 11...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
12631107

Subtask #3:

score: 0
Wrong Answer

Test #25:

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

input:

1
355365355024496523

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1948 893
482 893
495 140
523 140
1361 893
1560 893
2724 893
220 893
3563 140
3174 893
886 893
543 140
1684 140
2342 140
1053 893
1142 140
2109 140
342 893
3952 893
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1948 893
482 893
495 140
523 140
1361 893
1560 893
2724 893
220 893
3563 140
3174 893
886 893
543 140
1684 140
2342 140
1053 893
1142 140
2109 140
342 893
3952 893
...

output:

2
5000 3087
1 3540
2 1110
3 474
4 2444
5 3477
6 170
6 698
6 3339
6 4246
9 170
10 893
11 3516
12 3339
13 59
14 3477
15 959
16 3710
17 2998
19 2828
20 1200
21 3786
23 4211
25 1171
27 2992
30 140
33 1786
34 2871
35 2327
36 2227
37 855
39 3061
40 4246
41 3197
42 4684
43 335
44 657
45 1811
47 840
48 2476...

input:

2
5000 3087
1 3540
2 1110
3 474
4 2444
5 3477
6 170
6 698
6 3339
6 4246
9 170
10 893
11 3516
12 3339
13 59
14 3477
15 959
16 3710
17 2998
19 2828
20 1200
21 3786
23 4211
25 1171
27 2992
30 140
33 1786
34 2871
35 2327
36 2227
37 855
39 3061
40 4246
41 3197
42 4684
43 335
44 657
45 1811
47 840
48 2476...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
355365355024496523

Test #26:

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

input:

1
727827999106414164

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1948 893
482 140
495 140
523 893
1361 893
1560 893
2724 140
220 140
3563 140
3174 140
886 140
543 893
1684 140
2342 140
1053 140
1142 893
2109 893
342 140
3952 140
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1948 893
482 140
495 140
523 893
1361 893
1560 893
2724 140
220 140
3563 140
3174 140
886 140
543 893
1684 140
2342 140
1053 140
1142 893
2109 893
342 140
3952 140
...

output:

2
5000 3087
1 3540
2 1110
3 855
4 2444
5 3477
6 170
6 698
6 3339
6 4246
9 3339
10 893
11 3516
12 170
13 59
14 1892
15 1100
16 3710
17 3219
19 2828
20 3061
21 2156
23 4243
25 2213
27 560
30 893
33 3011
34 4607
35 2327
36 3790
37 474
39 1200
40 4246
41 1937
42 4684
43 4039
44 657
45 2327
47 195
48 247...

input:

2
5000 3087
1 3540
2 1110
3 855
4 2444
5 3477
6 170
6 698
6 3339
6 4246
9 3339
10 893
11 3516
12 170
13 59
14 1892
15 1100
16 3710
17 3219
19 2828
20 3061
21 2156
23 4243
25 2213
27 560
30 893
33 3011
34 4607
35 2327
36 3790
37 474
39 1200
40 4246
41 1937
42 4684
43 4039
44 657
45 2327
47 195
48 247...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
727827999106414164

Test #27:

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

input:

1
656410143989222955

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1948 893
482 140
495 893
523 140
1361 140
1560 893
2724 893
220 140
3563 140
3174 140
886 893
543 893
1684 893
2342 140
1053 140
1142 140
2109 893
342 140
3952 140
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1948 893
482 140
495 893
523 140
1361 140
1560 893
2724 893
220 140
3563 140
3174 140
886 893
543 893
1684 893
2342 140
1053 140
1142 140
2109 893
342 140
3952 140
...

output:

2
5000 3087
1 3540
2 1110
3 474
4 2444
5 1892
6 170
6 698
6 3339
6 4246
9 170
10 140
11 4303
12 3339
13 1110
14 1892
15 1100
16 3710
17 3219
19 2828
20 1200
21 2156
23 4211
25 2213
27 2992
30 893
33 3011
34 4607
35 2327
36 3790
37 855
39 1200
40 4246
41 1937
42 2045
43 4039
44 657
45 1811
47 195
48 ...

input:

2
5000 3087
1 3540
2 1110
3 474
4 2444
5 1892
6 170
6 698
6 3339
6 4246
9 170
10 140
11 4303
12 3339
13 1110
14 1892
15 1100
16 3710
17 3219
19 2828
20 1200
21 2156
23 4211
25 2213
27 2992
30 893
33 3011
34 4607
35 2327
36 3790
37 855
39 1200
40 4246
41 1937
42 2045
43 4039
44 657
45 1811
47 195
48 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
656410143989222955

Test #28:

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

input:

1
410366615149657534

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1948 893
482 893
495 140
523 140
1361 140
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 140
2342 893
1053 140
1142 893
2109 893
342 140
3952 140
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1948 893
482 893
495 140
523 140
1361 140
1560 893
2724 893
220 893
3563 893
3174 893
886 893
543 893
1684 140
2342 893
1053 140
1142 893
2109 893
342 140
3952 140
...

output:

2
5000 3087
1 4063
2 1110
3 855
4 2328
5 3477
6 170
6 698
6 3339
6 4246
9 3339
10 893
11 3516
12 3339
13 59
14 3477
15 1100
16 613
17 3219
19 1338
20 3061
21 2156
23 4211
25 2213
27 560
30 893
33 3011
34 4607
35 1811
36 3790
37 474
39 3061
40 4246
41 1937
42 4684
43 335
44 657
45 2327
47 195
48 2476...

input:

2
5000 3087
1 4063
2 1110
3 855
4 2328
5 3477
6 170
6 698
6 3339
6 4246
9 3339
10 893
11 3516
12 3339
13 59
14 3477
15 1100
16 613
17 3219
19 1338
20 3061
21 2156
23 4211
25 2213
27 560
30 893
33 3011
34 4607
35 1811
36 3790
37 474
39 3061
40 4246
41 1937
42 4684
43 335
44 657
45 2327
47 195
48 2476...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
410366615149657534

Test #29:

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

input:

1
298090682780948428

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1948 893
482 893
495 140
523 893
1361 140
1560 893
2724 893
220 893
3563 140
3174 140
886 893
543 140
1684 140
2342 893
1053 140
1142 893
2109 140
342 893
3952 893
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1948 893
482 893
495 140
523 893
1361 140
1560 893
2724 893
220 893
3563 140
3174 140
886 893
543 140
1684 140
2342 893
1053 140
1142 893
2109 140
342 893
3952 893
...

output:

2
5000 3087
1 4063
2 59
3 474
4 2328
5 3477
6 170
6 698
6 3339
6 4246
9 3339
10 893
11 3516
12 170
13 59
14 3477
15 959
16 3710
17 3219
19 2828
20 3061
21 2156
23 4211
25 1171
27 2992
30 893
33 3011
34 2871
35 2327
36 3790
37 474
39 3061
40 4246
41 3197
42 4684
43 335
44 657
45 1811
47 195
48 2476
4...

input:

2
5000 3087
1 4063
2 59
3 474
4 2328
5 3477
6 170
6 698
6 3339
6 4246
9 3339
10 893
11 3516
12 170
13 59
14 3477
15 959
16 3710
17 3219
19 2828
20 3061
21 2156
23 4211
25 1171
27 2992
30 893
33 3011
34 2871
35 2327
36 3790
37 474
39 3061
40 4246
41 3197
42 4684
43 335
44 657
45 1811
47 195
48 2476
4...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
298090682780948428

Test #30:

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

input:

3
969441916331132577

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1948 140
482 893
495 893
523 893
1361 893
1560 140
2724 140
220 140
3563 893
3174 893
886 140
543 893
1684 140
2342 140
1053 893
1142 140
2109 893
342 893
3952 893
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1948 140
482 893
495 893
523 893
1361 893
1560 140
2724 140
220 140
3563 893
3174 893
886 140
543 893
1684 140
2342 140
1053 893
1142 140
2109 893
342 893
3952 893
...

output:

4
5000 2500
1 4063
2 1110
3 855
6 1441
6 3339
6 4017
6 4246
11 3516
12 3339
13 1110
14 3477
18 4427
20 1200
21 3786
22 2773
23 4243
24 2828
26 843
27 560
28 3991
32 4427
33 1786
37 855
38 3980
39 1200
43 4039
44 3980
45 2327
52 4684
53 922
54 130
56 59
57 1298
59 83
59 196
59 296
59 332
59 344
59 44...

input:

4
5000 2500
1 4063
2 1110
3 855
6 1441
6 3339
6 4017
6 4246
11 3516
12 3339
13 1110
14 3477
18 4427
20 1200
21 3786
22 2773
23 4243
24 2828
26 843
27 560
28 3991
32 4427
33 1786
37 855
38 3980
39 1200
43 4039
44 3980
45 2327
52 4684
53 922
54 130
56 59
57 1298
59 83
59 196
59 296
59 332
59 344
59 44...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
969441916331132577

Test #31:

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

input:

3
929489812741933634

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1948 140
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 140
3563 140
3174 140
886 140
543 893
1684 893
2342 893
1053 140
1142 140
2109 140
342 140
3952 140
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1948 140
482 893
495 893
523 893
1361 893
1560 893
2724 893
220 140
3563 140
3174 140
886 140
543 893
1684 893
2342 893
1053 140
1142 140
2109 140
342 140
3952 140
...

output:

4
5000 2500
2 59
4 2328
6 1441
6 3339
6 4017
6 4246
9 3339
12 3339
13 1110
17 3219
19 2828
22 2773
25 2213
26 843
28 3991
32 4427
35 2327
36 2227
38 3980
39 1200
40 4246
43 4039
44 3980
46 4455
52 4684
54 130
55 2227
56 59
59 83
59 279
59 344
59 389
59 666
59 864
59 950
59 966
59 1096
59 1778
59 215...

input:

4
5000 2500
2 59
4 2328
6 1441
6 3339
6 4017
6 4246
9 3339
12 3339
13 1110
17 3219
19 2828
22 2773
25 2213
26 843
28 3991
32 4427
35 2327
36 2227
38 3980
39 1200
40 4246
43 4039
44 3980
46 4455
52 4684
54 130
55 2227
56 59
59 83
59 279
59 344
59 389
59 666
59 864
59 950
59 966
59 1096
59 1778
59 215...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
929489812741933634

Test #32:

score: 65
Accepted
time: 0ms = 0ms + 0ms
memory: 2012kb,25456kb

input:

3
144032041325838295

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1948 893
482 893
495 893
523 140
1361 893
1560 140
2724 893
220 893
3563 893
3174 893
886 893
543 140
1684 893
2342 140
1053 140
1142 893
2109 140
342 140
3952 140
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1948 893
482 893
495 893
523 140
1361 893
1560 140
2724 893
220 893
3563 893
3174 893
886 893
543 140
1684 893
2342 140
1053 140
1142 893
2109 140
342 140
3952 140
...

output:

4
5000 2500
1 4063
2 1110
3 855
4 2328
5 3477
6 1441
6 3339
6 4017
6 4246
7 1300
8 613
9 3339
10 140
11 3516
13 1110
15 959
17 3219
23 4243
25 2213
26 843
27 560
29 4455
32 4427
34 2871
36 2227
39 1200
42 4684
44 3980
45 2327
46 4455
50 3291
53 922
56 59
57 1298
59 174
59 332
59 389
59 666
59 695
59...

input:

4
5000 2500
1 4063
2 1110
3 855
4 2328
5 3477
6 1441
6 3339
6 4017
6 4246
7 1300
8 613
9 3339
10 140
11 3516
13 1110
15 959
17 3219
23 4243
25 2213
26 843
27 560
29 4455
32 4427
34 2871
36 2227
39 1200
42 4684
44 3980
45 2327
46 4455
50 3291
53 922
56 59
57 1298
59 174
59 332
59 389
59 666
59 695
59...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
144032041325838295

Test #33:

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

input:

3
832110946250826180

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1948 893
482 140
495 140
523 140
1361 893
1560 893
2724 140
220 893
3563 140
3174 893
886 893
543 140
1684 893
2342 140
1053 893
1142 140
2109 893
342 893
3952 140
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1948 893
482 140
495 140
523 140
1361 893
1560 893
2724 140
220 893
3563 140
3174 893
886 893
543 140
1684 893
2342 140
1053 893
1142 140
2109 893
342 893
3952 140
...

output:

4
5000 2500
1 4063
2 1110
3 855
5 3477
6 1441
6 3339
6 4017
6 4246
7 1300
9 3339
13 1110
15 959
18 4427
19 2828
20 1200
24 2828
25 2213
26 843
28 3991
29 4455
30 140
32 4427
34 2871
35 2327
37 855
39 1200
40 4246
42 4684
47 840
48 2476
49 1296
51 1119
55 2227
56 59
57 1298
59 174
59 196
59 279
59 29...

input:

4
5000 2500
1 4063
2 1110
3 855
5 3477
6 1441
6 3339
6 4017
6 4246
7 1300
9 3339
13 1110
15 959
18 4427
19 2828
20 1200
24 2828
25 2213
26 843
28 3991
29 4455
30 140
32 4427
34 2871
35 2327
37 855
39 1200
40 4246
42 4684
47 840
48 2476
49 1296
51 1119
55 2227
56 59
57 1298
59 174
59 196
59 279
59 29...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
832110946250826180

Test #34:

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

input:

3
85728715707691821

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1948 893
482 893
495 893
523 893
1361 140
1560 140
2724 893
220 893
3563 893
3174 893
886 140
543 140
1684 893
2342 140
1053 893
1142 140
2109 893
342 893
3952 140
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1948 893
482 893
495 893
523 893
1361 140
1560 140
2724 893
220 893
3563 893
3174 893
886 140
543 140
1684 893
2342 140
1053 893
1142 140
2109 893
342 893
3952 140
...

output:

4
5000 2500
1 4063
2 59
3 855
4 2328
5 3477
6 1441
6 3339
6 4017
6 4246
7 1300
8 613
9 3339
13 1110
14 3477
15 959
16 613
20 1200
24 2828
25 2213
27 560
28 3991
29 4455
30 140
36 2227
37 855
42 4684
45 2327
47 840
50 3291
53 922
55 2227
56 1110
57 1298
59 174
59 344
59 389
59 666
59 796
59 817
59 85...

input:

4
5000 2500
1 4063
2 59
3 855
4 2328
5 3477
6 1441
6 3339
6 4017
6 4246
7 1300
8 613
9 3339
13 1110
14 3477
15 959
16 613
20 1200
24 2828
25 2213
27 560
28 3991
29 4455
30 140
36 2227
37 855
42 4684
45 2327
47 840
50 3291
53 922
55 2227
56 1110
57 1298
59 174
59 344
59 389
59 666
59 796
59 817
59 85...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
85728715707691821

Test #35:

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

input:

5
777434612360931036

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
1948 893
482 140
495 140
523 893
1361 140
1560 893
2724 140
220 893
3563 140
3174 893
886 140
543 893
1684 140
2342 893
1053 140
1142 893
2109 140
342 893
3952 893
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
1948 893
482 140
495 140
523 893
1361 140
1560 893
2724 140
220 893
3563 140
3174 893
886 140
543 893
1684 140
2342 893
1053 140
1142 893
2109 140
342 893
3952 893
...

output:

6
5000 2530
4 2444
5 1892
6 4017
7 667
9 170
11 3516
12 3339
14 1892
15 1100
18 4427
26 843
27 560
29 3625
32 4427
33 3011
34 4607
35 2327
40 4246
42 2045
45 2327
46 3625
47 840
48 2476
49 1296
50 3291
52 2045
54 3718
57 1454
58 1296
59 2846
62 1786
63 87
64 182
64 356
64 617
64 856
64 1140
64 1443
...

input:

6
5000 2530
4 2444
5 1892
6 4017
7 667
9 170
11 3516
12 3339
14 1892
15 1100
18 4427
26 843
27 560
29 3625
32 4427
33 3011
34 4607
35 2327
40 4246
42 2045
45 2327
46 3625
47 840
48 2476
49 1296
50 3291
52 2045
54 3718
57 1454
58 1296
59 2846
62 1786
63 87
64 182
64 356
64 617
64 856
64 1140
64 1443
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
777434612360931036

Test #36:

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

input:

5
705262511549880222

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
1948 893
482 140
495 140
523 893
1361 893
1560 893
2724 893
220 893
3563 140
3174 140
886 140
543 140
1684 893
2342 140
1053 140
1142 893
2109 140
342 893
3952 140
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
1948 893
482 140
495 140
523 893
1361 893
1560 893
2724 893
220 893
3563 140
3174 140
886 140
543 140
1684 893
2342 140
1053 140
1142 893
2109 140
342 893
3952 140
...

output:

6
5000 2530
4 2444
5 3477
6 4017
7 1300
9 3339
11 4303
12 3339
14 3477
15 959
18 87
26 808
27 2992
29 4455
32 87
33 3011
34 4607
35 1811
40 698
42 4684
45 1811
46 3625
47 195
48 2476
49 1296
50 4215
52 2045
54 3718
57 1298
58 1296
59 2846
62 3011
63 4427
64 182
64 356
64 568
64 731
64 738
64 856
64 ...

input:

6
5000 2530
4 2444
5 3477
6 4017
7 1300
9 3339
11 4303
12 3339
14 3477
15 959
18 87
26 808
27 2992
29 4455
32 87
33 3011
34 4607
35 1811
40 698
42 4684
45 1811
46 3625
47 195
48 2476
49 1296
50 4215
52 2045
54 3718
57 1298
58 1296
59 2846
62 3011
63 4427
64 182
64 356
64 568
64 731
64 738
64 856
64 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
705262511549880222

Test #37:

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

input:

5
510318082834167951

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
1948 893
482 140
495 893
523 893
1361 893
1560 140
2724 140
220 893
3563 893
3174 893
886 893
543 140
1684 140
2342 140
1053 893
1142 893
2109 893
342 140
3952 140
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
1948 893
482 140
495 893
523 893
1361 893
1560 140
2724 140
220 893
3563 893
3174 893
886 893
543 140
1684 140
2342 140
1053 893
1142 893
2109 893
342 140
3952 140
...

output:

6
5000 2530
4 2444
5 1892
6 4017
7 667
9 3339
11 3516
12 170
14 1892
15 959
18 4427
26 843
27 2992
29 3625
32 4427
33 1786
34 2871
35 2327
40 698
42 2045
45 1811
46 4455
47 840
48 1615
49 1958
50 4215
52 2045
54 3718
57 1298
58 1296
59 2846
62 3011
63 4427
64 182
64 226
64 568
64 617
64 731
64 738
6...

input:

6
5000 2530
4 2444
5 1892
6 4017
7 667
9 3339
11 3516
12 170
14 1892
15 959
18 4427
26 843
27 2992
29 3625
32 4427
33 1786
34 2871
35 2327
40 698
42 2045
45 1811
46 4455
47 840
48 1615
49 1958
50 4215
52 2045
54 3718
57 1298
58 1296
59 2846
62 3011
63 4427
64 182
64 226
64 568
64 617
64 731
64 738
6...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
510318082834167951

Test #38:

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

input:

5
914858813253258744

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
1948 893
482 140
495 140
523 140
1361 140
1560 140
2724 140
220 140
3563 140
3174 893
886 893
543 140
1684 893
2342 893
1053 140
1142 893
2109 893
342 140
3952 140
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
1948 893
482 140
495 140
523 140
1361 140
1560 140
2724 140
220 140
3563 140
3174 893
886 893
543 140
1684 893
2342 893
1053 140
1142 893
2109 893
342 140
3952 140
...

output:

6
5000 2530
4 2444
5 3477
6 4017
7 1300
9 170
11 4303
12 3339
14 1892
15 959
18 4427
26 808
27 2992
29 4455
32 87
33 1786
34 2871
35 1811
40 4246
42 4684
45 1811
46 4455
47 840
48 2476
49 1296
50 3291
52 2045
54 130
57 1298
58 1296
59 2846
62 3011
63 4427
64 182
64 226
64 356
64 568
64 731
64 738
64...

input:

6
5000 2530
4 2444
5 3477
6 4017
7 1300
9 170
11 4303
12 3339
14 1892
15 959
18 4427
26 808
27 2992
29 4455
32 87
33 1786
34 2871
35 1811
40 4246
42 4684
45 1811
46 4455
47 840
48 2476
49 1296
50 3291
52 2045
54 130
57 1298
58 1296
59 2846
62 3011
63 4427
64 182
64 226
64 356
64 568
64 731
64 738
64...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
914858813253258744

Test #39:

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

input:

5
659635316746638238

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
1948 893
482 140
495 893
523 140
1361 140
1560 893
2724 140
220 893
3563 893
3174 893
886 140
543 140
1684 140
2342 893
1053 893
1142 140
2109 140
342 140
3952 893
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
1948 893
482 140
495 893
523 140
1361 140
1560 893
2724 140
220 893
3563 893
3174 893
886 140
543 140
1684 140
2342 893
1053 893
1142 140
2109 140
342 140
3952 893
...

output:

6
5000 2530
4 2328
5 3477
6 4017
7 1300
9 170
11 3516
12 3339
14 1892
15 959
18 4427
26 843
27 2992
29 4455
32 4427
33 1786
34 4607
35 2327
40 4246
42 4684
45 1811
46 4455
47 195
48 1615
49 1958
50 4215
52 2045
54 3718
57 1454
58 1296
59 2846
62 3011
63 4427
64 103
64 182
64 226
64 356
64 568
64 617...

input:

6
5000 2530
4 2328
5 3477
6 4017
7 1300
9 170
11 3516
12 3339
14 1892
15 959
18 4427
26 843
27 2992
29 4455
32 4427
33 1786
34 4607
35 2327
40 4246
42 4684
45 1811
46 4455
47 195
48 1615
49 1958
50 4215
52 2045
54 3718
57 1454
58 1296
59 2846
62 3011
63 4427
64 103
64 182
64 226
64 356
64 568
64 617...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
659635316746638238

Test #40:

score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 2008kb,25200kb

input:

7
858490260563149759

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
1948 893
482 140
495 140
523 140
1361 893
1560 140
2724 140
220 893
3563 893
3174 140
886 140
543 893
1684 893
2342 893
1053 893
1142 893
2109 140
342 893
3952 140
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
1948 893
482 140
495 140
523 140
1361 893
1560 140
2724 140
220 893
3563 893
3174 140
886 140
543 893
1684 893
2342 893
1053 893
1142 893
2109 140
342 893
3952 140
...

output:

8
5000 2500
3 474
4 2444
10 893
11 4303
13 59
15 1100
16 3710
17 2998
19 1338
20 3061
21 3786
22 2169
23 4211
24 1338
26 808
28 1410
31 451
32 87
34 4607
35 1811
37 474
38 657
39 3061
41 1937
43 335
44 657
46 3625
52 2045
53 2067
54 3718
55 3790
56 59
57 1454
59 83
59 174
59 296
59 332
59 389
59 695...

input:

8
5000 2500
3 474
4 2444
10 893
11 4303
13 59
15 1100
16 3710
17 2998
19 1338
20 3061
21 3786
22 2169
23 4211
24 1338
26 808
28 1410
31 451
32 87
34 4607
35 1811
37 474
38 657
39 3061
41 1937
43 335
44 657
46 3625
52 2045
53 2067
54 3718
55 3790
56 59
57 1454
59 83
59 174
59 296
59 332
59 389
59 695...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
351758019256092159