QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#439473#8726. Magic Showahihi12340 3ms25932kbC++144.0kb2024-06-12 00:34:332024-06-12 00:34:35

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: 1988kb,25728kb

input:

1
4005

output:

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

input:

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

output:

2
5000 4077
1 1146
2 4848
3 4521
4 2801
5 3855
6 1765
7 4140
8 457
9 3569
10 2862
11 1664
12 3569
13 56
14 2863
15 517
16 457
17 1046
18 871
19 882
20 334
20 737
20 1211
20 2072
20 2318
20 2963
20 3137
20 3151
20 3243
20 3354
20 4288
20 4955
21 2224
23 102
24 191
26 3144
28 1818
28 2108
28 2352
28 2...

input:

2
5000 4077
1 1146
2 4848
3 4521
4 2801
5 3855
6 1765
7 4140
8 457
9 3569
10 2862
11 1664
12 3569
13 56
14 2863
15 517
16 457
17 1046
18 871
19 882
20 334
20 737
20 1211
20 2072
20 2318
20 2963
20 3137
20 3151
20 3243
20 3354
20 4288
20 4955
21 2224
23 102
24 191
26 3144
28 1818
28 2108
28 2352
28 2...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4005

Test #2:

score: 5
Accepted
time: 1ms = 1ms + 0ms
memory: 1980kb,25728kb

input:

1
459

output:

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

input:

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

output:

2
5000 4077
1 3538
2 4453
3 1005
4 2801
5 3855
6 1765
7 4140
8 457
9 3569
10 2862
11 1664
12 3569
13 56
14 2863
15 517
16 4192
17 1046
18 871
19 882
20 39
20 334
20 737
20 1211
20 1363
20 2072
20 2318
20 3137
20 3151
20 3243
20 3354
20 4288
20 4784
21 2224
23 4517
24 191
26 4688
28 1818
28 2108
28 2...

input:

2
5000 4077
1 3538
2 4453
3 1005
4 2801
5 3855
6 1765
7 4140
8 457
9 3569
10 2862
11 1664
12 3569
13 56
14 2863
15 517
16 4192
17 1046
18 871
19 882
20 39
20 334
20 737
20 1211
20 1363
20 2072
20 2318
20 3137
20 3151
20 3243
20 3354
20 4288
20 4784
21 2224
23 4517
24 191
26 4688
28 1818
28 2108
28 2...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
459

Test #3:

score: 5
Accepted
time: 3ms = 1ms + 2ms
memory: 1984kb,25724kb

input:

1
2495

output:

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

input:

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

output:

2
5000 4077
1 3538
2 4453
3 1005
4 2801
5 4977
6 1765
7 4140
8 4192
9 3031
10 2862
11 1664
12 3569
13 4001
14 2863
15 517
16 457
17 1046
18 871
19 882
20 737
20 1211
20 1363
20 2072
20 2318
20 2642
20 3137
20 3151
20 3198
20 3243
20 3354
20 4288
20 4955
21 2224
23 4517
24 191
26 4688
28 776
28 1818
...

input:

2
5000 4077
1 3538
2 4453
3 1005
4 2801
5 4977
6 1765
7 4140
8 4192
9 3031
10 2862
11 1664
12 3569
13 4001
14 2863
15 517
16 457
17 1046
18 871
19 882
20 737
20 1211
20 1363
20 2072
20 2318
20 2642
20 3137
20 3151
20 3198
20 3243
20 3354
20 4288
20 4955
21 2224
23 4517
24 191
26 4688
28 776
28 1818
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
2495

Test #4:

score: 5
Accepted
time: 0ms = 0ms + 0ms
memory: 1980kb,25296kb

input:

3
1560

output:

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

input:

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

output:

4
5000 2500
2 4453
5 4977
8 457
10 2862
16 457
20 4391
21 2224
23 4517
24 191
25 1990
26 4688
28 776
28 1310
28 1818
28 2352
28 2611
28 2858
28 3075
28 3123
28 3219
28 3413
28 4391
28 4461
28 4654
28 4713
28 4789
28 4918
30 797
31 4554
32 1687
33 3623
35 503
36 1839
39 3281
41 1339
43 1024
43 1135
4...

input:

4
5000 2500
2 4453
5 4977
8 457
10 2862
16 457
20 4391
21 2224
23 4517
24 191
25 1990
26 4688
28 776
28 1310
28 1818
28 2352
28 2611
28 2858
28 3075
28 3123
28 3219
28 3413
28 4391
28 4461
28 4654
28 4713
28 4789
28 4918
30 797
31 4554
32 1687
33 3623
35 503
36 1839
39 3281
41 1339
43 1024
43 1135
4...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1560

Test #5:

score: 5
Accepted
time: 1ms = 1ms + 0ms
memory: 1984kb,25300kb

input:

3
3594

output:

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

input:

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

output:

4
5000 2500
2 4453
5 4977
8 457
9 3031
11 1664
13 4001
15 517
16 457
17 1046
20 4391
23 4517
24 191
25 1990
27 2242
28 776
28 1041
28 1310
28 1818
28 2108
28 2858
28 2998
28 3075
28 3123
28 3219
28 3413
28 3614
28 4391
28 4461
28 4654
28 4789
30 797
31 4554
32 1687
34 1917
35 503
38 3551
39 3281
41 ...

input:

4
5000 2500
2 4453
5 4977
8 457
9 3031
11 1664
13 4001
15 517
16 457
17 1046
20 4391
23 4517
24 191
25 1990
27 2242
28 776
28 1041
28 1310
28 1818
28 2108
28 2858
28 2998
28 3075
28 3123
28 3219
28 3413
28 3614
28 4391
28 4461
28 4654
28 4789
30 797
31 4554
32 1687
34 1917
35 503
38 3551
39 3281
41 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
3594

Test #6:

score: 5
Accepted
time: 1ms = 1ms + 0ms
memory: 1984kb,25296kb

input:

3
1750

output:

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

input:

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

output:

4
5000 2500
2 4453
5 4977
8 457
10 2862
11 1664
17 1046
20 4391
21 2224
23 4517
24 191
25 1990
26 4688
28 776
28 1310
28 1818
28 2108
28 2352
28 2858
28 2998
28 3075
28 3123
28 3219
28 3413
28 4391
28 4461
28 4713
28 4789
28 4918
30 797
32 1687
33 3623
35 503
41 1339
43 1024
43 2017
43 2033
43 2193
...

input:

4
5000 2500
2 4453
5 4977
8 457
10 2862
11 1664
17 1046
20 4391
21 2224
23 4517
24 191
25 1990
26 4688
28 776
28 1310
28 1818
28 2108
28 2352
28 2858
28 2998
28 3075
28 3123
28 3219
28 3413
28 4391
28 4461
28 4713
28 4789
28 4918
30 797
32 1687
33 3623
35 503
41 1339
43 1024
43 2017
43 2033
43 2193
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1750

Test #7:

score: 5
Accepted
time: 1ms = 1ms + 0ms
memory: 1980kb,25300kb

input:

5
4878

output:

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

input:

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

output:

6
5000 2634
2 4453
3 4521
4 2801
5 3855
6 1765
8 4192
9 3031
10 2862
12 3569
13 4001
14 2863
16 457
18 871
20 591
20 717
20 737
20 1211
20 1918
20 1936
20 2072
20 2318
20 2642
20 3137
20 3151
20 3243
20 3354
20 3435
20 4288
20 4784
20 4897
21 2224
22 1922
23 4517
25 1990
26 3144
27 2242
28 1041
28 1...

input:

6
5000 2634
2 4453
3 4521
4 2801
5 3855
6 1765
8 4192
9 3031
10 2862
12 3569
13 4001
14 2863
16 457
18 871
20 591
20 717
20 737
20 1211
20 1918
20 1936
20 2072
20 2318
20 2642
20 3137
20 3151
20 3243
20 3354
20 3435
20 4288
20 4784
20 4897
21 2224
22 1922
23 4517
25 1990
26 3144
27 2242
28 1041
28 1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4878

Test #8:

score: 5
Accepted
time: 0ms = 0ms + 0ms
memory: 1980kb,25300kb

input:

5
1223

output:

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

input:

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

output:

6
5000 2634
2 4453
3 1005
4 2801
5 4977
6 1765
8 457
9 3031
10 3188
12 3569
13 4001
14 2863
16 457
18 871
20 478
20 737
20 1211
20 1363
20 1918
20 1936
20 2072
20 2078
20 2318
20 3137
20 3151
20 3243
20 3354
20 3950
20 4288
20 4784
20 4897
21 2224
22 1922
23 102
25 1870
26 4688
27 2242
28 776
28 104...

input:

6
5000 2634
2 4453
3 1005
4 2801
5 4977
6 1765
8 457
9 3031
10 3188
12 3569
13 4001
14 2863
16 457
18 871
20 478
20 737
20 1211
20 1363
20 1918
20 1936
20 2072
20 2078
20 2318
20 3137
20 3151
20 3243
20 3354
20 3950
20 4288
20 4784
20 4897
21 2224
22 1922
23 102
25 1870
26 4688
27 2242
28 776
28 104...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1223

Test #9:

score: 5
Accepted
time: 1ms = 1ms + 0ms
memory: 1984kb,25300kb

input:

5
648

output:

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

input:

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

output:

6
5000 2634
2 4453
3 1005
4 2801
5 3855
6 1765
8 4192
9 3031
10 2862
12 3569
13 4001
14 2863
16 457
18 871
20 737
20 1211
20 1363
20 1918
20 1936
20 2072
20 2318
20 2642
20 3137
20 3151
20 3243
20 3354
20 3435
20 4099
20 4235
20 4288
20 4897
21 2224
22 1922
23 4517
25 1990
26 4688
27 2242
28 1041
28...

input:

6
5000 2634
2 4453
3 1005
4 2801
5 3855
6 1765
8 4192
9 3031
10 2862
12 3569
13 4001
14 2863
16 457
18 871
20 737
20 1211
20 1363
20 1918
20 1936
20 2072
20 2318
20 2642
20 3137
20 3151
20 3243
20 3354
20 3435
20 4099
20 4235
20 4288
20 4897
21 2224
22 1922
23 4517
25 1990
26 4688
27 2242
28 1041
28...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
648

Test #10:

score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1984kb,25268kb

input:

7
4475

output:

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

input:

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

output:

8
5000 2500
4 2801
5 3855
6 1765
7 4140
12 3569
14 2863
17 1046
18 871
19 882
20 478
20 737
20 1211
20 1918
20 1936
20 2072
20 2078
20 2318
20 3137
20 3151
20 3198
20 3243
20 3354
20 3435
20 3925
20 4288
20 4897
22 1922
23 102
25 1870
27 2242
29 56
30 3989
32 871
35 558
37 1005
40 3395
41 3182
42 36...

input:

8
5000 2500
4 2801
5 3855
6 1765
7 4140
12 3569
14 2863
17 1046
18 871
19 882
20 478
20 737
20 1211
20 1918
20 1936
20 2072
20 2078
20 2318
20 3137
20 3151
20 3198
20 3243
20 3354
20 3435
20 3925
20 4288
20 4897
22 1922
23 102
25 1870
27 2242
29 56
30 3989
32 871
35 558
37 1005
40 3395
41 3182
42 36...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
16

Subtask #2:

score: 0
Wrong Answer

Test #13:

score: 30
Accepted
time: 0ms = 0ms + 0ms
memory: 1984kb,25732kb

input:

1
17476204

output:

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

input:

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

output:

2
5000 4077
1 1146
2 4848
3 4521
4 2185
5 4977
6 1765
7 821
8 457
9 3031
10 2862
11 2679
12 3569
13 4001
14 2863
15 517
16 4192
17 1046
18 871
19 882
20 39
20 591
20 737
20 1211
20 2072
20 2318
20 2963
20 3137
20 3151
20 3243
20 3597
20 4244
20 4288
21 1505
23 102
24 191
26 3144
28 265
28 776
28 996...

input:

2
5000 4077
1 1146
2 4848
3 4521
4 2185
5 4977
6 1765
7 821
8 457
9 3031
10 2862
11 2679
12 3569
13 4001
14 2863
15 517
16 4192
17 1046
18 871
19 882
20 39
20 591
20 737
20 1211
20 2072
20 2318
20 2963
20 3137
20 3151
20 3243
20 3597
20 4244
20 4288
21 1505
23 102
24 191
26 3144
28 265
28 776
28 996...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
17476204

Test #14:

score: 30
Accepted
time: 3ms = 1ms + 2ms
memory: 1984kb,25728kb

input:

1
11926600

output:

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

input:

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

output:

2
5000 4077
1 1146
2 4453
3 4521
4 2801
5 3855
6 1765
7 4140
8 457
9 3031
10 3188
11 1664
12 3569
13 4001
14 2062
15 2198
16 457
17 1046
18 871
19 191
20 591
20 717
20 737
20 2072
20 2318
20 3137
20 3243
20 3354
20 3597
20 3950
20 4099
20 4784
20 4955
21 1505
23 102
24 882
26 3144
28 111
28 1547
28 ...

input:

2
5000 4077
1 1146
2 4453
3 4521
4 2801
5 3855
6 1765
7 4140
8 457
9 3031
10 3188
11 1664
12 3569
13 4001
14 2062
15 2198
16 457
17 1046
18 871
19 191
20 591
20 717
20 737
20 2072
20 2318
20 3137
20 3243
20 3354
20 3597
20 3950
20 4099
20 4784
20 4955
21 1505
23 102
24 882
26 3144
28 111
28 1547
28 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
11926600

Test #15:

score: 30
Accepted
time: 1ms = 1ms + 0ms
memory: 1980kb,25732kb

input:

1
16602378

output:

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

input:

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

output:

2
5000 4077
1 3538
2 4848
3 1005
4 2185
5 3855
6 1765
7 821
8 457
9 3031
10 3188
11 1664
12 3569
13 4001
14 2062
15 2198
16 457
17 1046
18 871
19 882
20 591
20 717
20 737
20 1363
20 2078
20 2318
20 2963
20 3137
20 3198
20 3243
20 3950
20 4235
20 4784
21 2224
23 4517
24 191
26 4688
28 111
28 265
28 1...

input:

2
5000 4077
1 3538
2 4848
3 1005
4 2185
5 3855
6 1765
7 821
8 457
9 3031
10 3188
11 1664
12 3569
13 4001
14 2062
15 2198
16 457
17 1046
18 871
19 882
20 591
20 717
20 737
20 1363
20 2078
20 2318
20 2963
20 3137
20 3198
20 3243
20 3950
20 4235
20 4784
21 2224
23 4517
24 191
26 4688
28 111
28 265
28 1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
16602378

Test #16:

score: 30
Accepted
time: 1ms = 1ms + 0ms
memory: 1980kb,25288kb

input:

3
13129243

output:

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

input:

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

output:

4
5000 2500
1 1146
2 4453
3 4521
5 4977
8 457
10 2862
19 191
20 4391
22 4834
23 4517
24 191
26 3144
27 1873
28 776
28 1310
28 1547
28 2352
28 2611
28 2998
28 3075
28 3123
28 3219
28 3388
28 3413
28 3796
28 3938
28 4391
28 4713
28 4983
29 4001
30 797
35 503
36 1839
37 4521
40 1835
42 4381
43 586
43 2...

input:

4
5000 2500
1 1146
2 4453
3 4521
5 4977
8 457
10 2862
19 191
20 4391
22 4834
23 4517
24 191
26 3144
27 1873
28 776
28 1310
28 1547
28 2352
28 2611
28 2998
28 3075
28 3123
28 3219
28 3388
28 3413
28 3796
28 3938
28 4391
28 4713
28 4983
29 4001
30 797
35 503
36 1839
37 4521
40 1835
42 4381
43 586
43 2...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
13129243

Test #17:

score: 30
Accepted
time: 0ms = 0ms + 0ms
memory: 1984kb,25288kb

input:

3
7892141

output:

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

input:

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

output:

4
5000 2500
1 1146
2 4453
3 4521
5 4977
9 3031
11 1664
13 4001
16 457
20 4391
21 2224
24 191
26 3144
27 1873
28 776
28 1041
28 1310
28 1547
28 1818
28 2108
28 2611
28 2858
28 2998
28 3075
28 3219
28 3388
28 3938
28 4391
28 4654
28 4918
29 4001
30 797
31 4554
34 1917
35 503
36 1839
38 3551
39 3281
40...

input:

4
5000 2500
1 1146
2 4453
3 4521
5 4977
9 3031
11 1664
13 4001
16 457
20 4391
21 2224
24 191
26 3144
27 1873
28 776
28 1041
28 1310
28 1547
28 1818
28 2108
28 2611
28 2858
28 2998
28 3075
28 3219
28 3388
28 3938
28 4391
28 4654
28 4918
29 4001
30 797
31 4554
34 1917
35 503
36 1839
38 3551
39 3281
40...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
7892141

Test #18:

score: 30
Accepted
time: 1ms = 1ms + 0ms
memory: 1988kb,25288kb

input:

3
21314775

output:

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

input:

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

output:

4
5000 2500
2 4453
4 2185
7 821
9 3031
11 1664
13 4001
14 2062
15 517
19 191
20 4391
21 2224
22 4834
24 191
26 4688
28 111
28 265
28 996
28 1041
28 1310
28 2108
28 2858
28 3075
28 3219
28 3614
28 4391
28 4431
28 4461
28 4713
28 4918
28 4983
32 1687
34 1917
38 3551
41 1339
42 4381
43 180
43 306
43 10...

input:

4
5000 2500
2 4453
4 2185
7 821
9 3031
11 1664
13 4001
14 2062
15 517
19 191
20 4391
21 2224
22 4834
24 191
26 4688
28 111
28 265
28 996
28 1041
28 1310
28 2108
28 2858
28 3075
28 3219
28 3614
28 4391
28 4431
28 4461
28 4713
28 4918
28 4983
32 1687
34 1917
38 3551
41 1339
42 4381
43 180
43 306
43 10...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
21314775

Test #19:

score: 30
Accepted
time: 1ms = 1ms + 0ms
memory: 1988kb,25296kb

input:

5
5559540

output:

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

input:

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

output:

6
5000 2634
2 4848
3 1005
4 2185
5 3855
6 1765
8 457
9 3031
10 2862
12 3569
13 4001
14 2062
16 4192
18 871
20 39
20 405
20 478
20 717
20 737
20 1211
20 1363
20 1918
20 1936
20 2318
20 2963
20 3137
20 3198
20 3243
20 3435
20 4897
20 4955
21 2224
22 1922
23 102
25 1990
26 4688
27 2242
28 265
28 1041
2...

input:

6
5000 2634
2 4848
3 1005
4 2185
5 3855
6 1765
8 457
9 3031
10 2862
12 3569
13 4001
14 2062
16 4192
18 871
20 39
20 405
20 478
20 717
20 737
20 1211
20 1363
20 1918
20 1936
20 2318
20 2963
20 3137
20 3198
20 3243
20 3435
20 4897
20 4955
21 2224
22 1922
23 102
25 1990
26 4688
27 2242
28 265
28 1041
2...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
5559540

Test #20:

score: 30
Accepted
time: 1ms = 1ms + 0ms
memory: 1988kb,25296kb

input:

5
9424319

output:

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

input:

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

output:

6
5000 2634
2 4848
3 4521
4 2801
5 3855
6 1765
8 4192
9 3569
10 3188
12 3569
13 56
14 2863
16 4192
18 871
20 39
20 334
20 405
20 478
20 737
20 1918
20 2072
20 2318
20 2642
20 2963
20 3137
20 3151
20 3243
20 3354
20 3435
20 3597
20 3950
21 1505
22 4834
23 102
25 1990
26 3144
27 1873
28 111
28 1310
28...

input:

6
5000 2634
2 4848
3 4521
4 2801
5 3855
6 1765
8 4192
9 3569
10 3188
12 3569
13 56
14 2863
16 4192
18 871
20 39
20 334
20 405
20 478
20 737
20 1918
20 2072
20 2318
20 2642
20 2963
20 3137
20 3151
20 3243
20 3354
20 3435
20 3597
20 3950
21 1505
22 4834
23 102
25 1990
26 3144
27 1873
28 111
28 1310
28...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
9424319

Test #21:

score: 30
Accepted
time: 2ms = 0ms + 2ms
memory: 1980kb,25304kb

input:

5
10955780

output:

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

input:

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

output:

6
5000 2634
2 4453
3 4521
4 2801
5 4977
6 1765
8 4192
9 3031
10 2862
12 3569
13 4001
14 2062
16 4192
18 871
20 39
20 405
20 737
20 1918
20 2072
20 2078
20 2318
20 2642
20 3137
20 3243
20 3354
20 3597
20 3925
20 4099
20 4235
20 4288
20 4897
21 1505
22 1922
23 4517
25 1870
26 3144
27 1873
28 111
28 77...

input:

6
5000 2634
2 4453
3 4521
4 2801
5 4977
6 1765
8 4192
9 3031
10 2862
12 3569
13 4001
14 2062
16 4192
18 871
20 39
20 405
20 737
20 1918
20 2072
20 2078
20 2318
20 2642
20 3137
20 3243
20 3354
20 3597
20 3925
20 4099
20 4235
20 4288
20 4897
21 1505
22 1922
23 4517
25 1870
26 3144
27 1873
28 111
28 77...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
10955780

Test #22:

score: 0
Wrong Answer
time: 1ms = 1ms + 0ms
memory: 1988kb,25272kb

input:

7
19938721

output:

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

input:

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

output:

8
5000 2500
2 4848
4 2801
6 1765
7 4140
9 3569
10 3188
12 3569
13 56
16 4192
17 1046
18 871
20 39
20 334
20 478
20 737
20 1211
20 1936
20 2072
20 2318
20 2963
20 3137
20 3243
20 3354
20 3597
20 3925
20 3950
20 4235
20 4288
21 1505
23 102
27 2242
29 56
31 854
33 710
34 2770
37 1005
38 4236
40 3395
44...

input:

8
5000 2500
2 4848
4 2801
6 1765
7 4140
9 3569
10 3188
12 3569
13 56
16 4192
17 1046
18 871
20 39
20 334
20 478
20 737
20 1211
20 1936
20 2072
20 2318
20 2963
20 3137
20 3243
20 3354
20 3597
20 3925
20 3950
20 4235
20 4288
21 1505
23 102
27 2242
29 56
31 854
33 710
34 2770
37 1005
38 4236
40 3395
44...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
3876

Subtask #3:

score: 0
Wrong Answer

Test #25:

score: 0
Wrong Answer
time: 1ms = 1ms + 0ms
memory: 1984kb,25932kb

input:

1
355365355024496523

output:

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

input:

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

output:

2
5000 4617
1 1146
2 4453
3 4521
4 2185
5 4977
7 821
8 457
9 3031
10 2862
11 1664
12 3031
13 4001
14 2062
15 517
17 4296
18 1687
19 191
20 4391
21 2224
23 4517
24 191
26 3144
27 1873
28 111
28 265
28 776
28 1310
28 1547
28 1818
28 2097
28 2108
28 2352
28 2405
28 2611
28 2858
28 2998
28 3075
28 3123
...

input:

2
5000 4617
1 1146
2 4453
3 4521
4 2185
5 4977
7 821
8 457
9 3031
10 2862
11 1664
12 3031
13 4001
14 2062
15 517
17 4296
18 1687
19 191
20 4391
21 2224
23 4517
24 191
26 3144
27 1873
28 111
28 265
28 776
28 1310
28 1547
28 1818
28 2097
28 2108
28 2352
28 2405
28 2611
28 2858
28 2998
28 3075
28 3123
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
565727082