QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#484038#8726. Magic ShowInaba00100 ✓1ms1880kbC++143.1kb2024-07-19 15:33:322024-07-19 15:33:33

詳細信息

Subtask #1:

score: 5
Accepted

Test #1:

score: 5
Accepted
time: 1ms = 1ms + 0ms
memory: 1860kb,1872kb

input:

1
4005

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4980
4871 3216
4871 3633
4871 4561
4871 3259
4871 2545
4871 1590
4871 1169
1217 847
1217 4522
1217 886
1217 2506
1217 3076
1217 2613
1217 1940
2725 4860
2725 874
2725 81...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4980
4871 3216
4871 3633
4871 4561
4871 3259
4871 2545
4871 1590
4871 1169
1217 847
1217 4522
1217 886
1217 2506
1217 3076
1217 2613
1217 1940
2725 4860
2725 874
2725 81...

output:

2
4980 4413
1 3863
2 3464
3 3396
4 2904
5 4482
6 3438
7 2842
8 1118
9 422
10 3590
11 4188
12 3392
13 2830
14 3742
15 3268
16 4502
17 1598
18 1182
19 1766
20 330
20 1694
20 1895
20 2083
20 2119
20 2144
20 2818
20 4447
20 4651
21 934
22 2242
23 3368
24 1081
24 1801
24 2216
24 2454
24 3043
24 4393
25 1...

input:

2
4980 4413
1 3863
2 3464
3 3396
4 2904
5 4482
6 3438
7 2842
8 1118
9 422
10 3590
11 4188
12 3392
13 2830
14 3742
15 3268
16 4502
17 1598
18 1182
19 1766
20 330
20 1694
20 1895
20 2083
20 2119
20 2144
20 2818
20 4447
20 4651
21 934
22 2242
23 3368
24 1081
24 1801
24 2216
24 2454
24 3043
24 4393
25 1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4005

Test #2:

score: 5
Accepted
time: 0ms = 0ms + 0ms
memory: 1856kb,1872kb

input:

1
459

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4980
4871 3216
4871 3633
4871 4561
4871 3259
4871 2545
4871 1590
4871 1169
1217 847
1217 4522
1217 886
1217 2506
1217 3076
1217 2613
1217 1940
2725 4860
2725 874
2725 81...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4980
4871 3216
4871 3633
4871 4561
4871 3259
4871 2545
4871 1590
4871 1169
1217 847
1217 4522
1217 886
1217 2506
1217 3076
1217 2613
1217 1940
2725 4860
2725 874
2725 81...

output:

2
4980 4413
1 4800
2 1320
2 1526
2 1992
2 2343
2 2598
2 2701
2 3564
2 3982
3 2354
4 1736
5 4752
6 1084
7 178
8 298
9 666
10 1608
11 3756
12 199
12 449
12 756
12 1117
12 3724
12 3976
12 4083
13 740
14 4110
15 100
17 4426
18 999
18 1324
18 2354
18 2564
18 2599
18 3360
18 3656
18 3873
18 4245
18 4267
1...

input:

2
4980 4413
1 4800
2 1320
2 1526
2 1992
2 2343
2 2598
2 2701
2 3564
2 3982
3 2354
4 1736
5 4752
6 1084
7 178
8 298
9 666
10 1608
11 3756
12 199
12 449
12 756
12 1117
12 3724
12 3976
12 4083
13 740
14 4110
15 100
17 4426
18 999
18 1324
18 2354
18 2564
18 2599
18 3360
18 3656
18 3873
18 4245
18 4267
1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
459

Test #3:

score: 5
Accepted
time: 1ms = 1ms + 0ms
memory: 1860kb,1876kb

input:

1
2495

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4980
4871 3216
4871 3633
4871 4561
4871 3259
4871 2545
4871 1590
4871 1169
1217 847
1217 4522
1217 886
1217 2506
1217 3076
1217 2613
1217 1940
2725 4860
2725 874
2725 81...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4980
4871 3216
4871 3633
4871 4561
4871 3259
4871 2545
4871 1590
4871 1169
1217 847
1217 4522
1217 886
1217 2506
1217 3076
1217 2613
1217 1940
2725 4860
2725 874
2725 81...

output:

2
4980 4413
1 4362
2 4224
3 4954
4 4442
5 3254
6 4790
7 1214
8 2696
9 4780
11 4188
12 1342
12 1563
12 2652
12 3085
12 4119
12 4571
12 4782
13 3204
14 2376
15 1846
16 151
16 806
16 1337
16 1691
16 1699
16 1779
16 2266
17 286
18 996
18 1131
18 1145
18 1584
18 1848
18 2048
18 2819
18 3658
18 3923
18 41...

input:

2
4980 4413
1 4362
2 4224
3 4954
4 4442
5 3254
6 4790
7 1214
8 2696
9 4780
11 4188
12 1342
12 1563
12 2652
12 3085
12 4119
12 4571
12 4782
13 3204
14 2376
15 1846
16 151
16 806
16 1337
16 1691
16 1699
16 1779
16 2266
17 286
18 996
18 1131
18 1145
18 1584
18 1848
18 2048
18 2819
18 3658
18 3923
18 41...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
2495

Test #4:

score: 5
Accepted
time: 1ms = 1ms + 0ms
memory: 1856kb,1840kb

input:

3
1560

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

output:

4
4980 2490
1 2047
3 2588
8 864
12 3676
13 1774
14 284
15 1092
16 4502
17 1598
18 2738
19 930
20 1624
21 2578
23 1262
24 3642
25 3786
26 4870
28 4162
30 3908
31 3860
32 2262
33 2903
36 3048
39 256
40 4576
44 4794
47 4034
48 1554
49 1756
52 2831
54 188
55 1910
56 474
58 2738
64 3116
65 1996
66 2368
6...

input:

4
4980 2490
1 2047
3 2588
8 864
12 3676
13 1774
14 284
15 1092
16 4502
17 1598
18 2738
19 930
20 1624
21 2578
23 1262
24 3642
25 3786
26 4870
28 4162
30 3908
31 3860
32 2262
33 2903
36 3048
39 256
40 4576
44 4794
47 4034
48 1554
49 1756
52 2831
54 188
55 1910
56 474
58 2738
64 3116
65 1996
66 2368
6...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1560

Test #5:

score: 5
Accepted
time: 0ms = 0ms + 0ms
memory: 1852kb,1848kb

input:

3
3594

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

output:

4
4980 2490
1 3327
3 2354
4 814
5 4480
6 2184
7 50
8 4084
9 858
11 4372
13 3918
16 842
19 2744
23 3212
27 1054
29 1064
30 1602
33 2410
36 3226
37 2522
39 952
40 4907
42 1060
43 2866
45 4834
46 475
48 1258
50 536
50 1830
50 2339
50 2407
50 3251
52 441
53 4974
57 2596
58 4480
59 1030
60 3516
61 814
62...

input:

4
4980 2490
1 3327
3 2354
4 814
5 4480
6 2184
7 50
8 4084
9 858
11 4372
13 3918
16 842
19 2744
23 3212
27 1054
29 1064
30 1602
33 2410
36 3226
37 2522
39 952
40 4907
42 1060
43 2866
45 4834
46 475
48 1258
50 536
50 1830
50 2339
50 2407
50 3251
52 441
53 4974
57 2596
58 4480
59 1030
60 3516
61 814
62...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
3594

Test #6:

score: 5
Accepted
time: 1ms = 1ms + 0ms
memory: 1856kb,1848kb

input:

3
1750

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

output:

4
4980 2490
2 3938
4 2904
5 3406
7 998
9 3540
11 3282
14 1294
16 4696
18 888
19 516
20 4218
21 2076
23 3212
25 2060
26 1582
27 4388
29 3678
30 4331
31 906
32 3010
35 120
36 2950
41 3858
43 4016
49 3402
50 856
51 3744
52 592
56 4850
57 2078
59 3532
63 3406
64 3802
65 4980
69 1123
71 1152
72 4170
73 4...

input:

4
4980 2490
2 3938
4 2904
5 3406
7 998
9 3540
11 3282
14 1294
16 4696
18 888
19 516
20 4218
21 2076
23 3212
25 2060
26 1582
27 4388
29 3678
30 4331
31 906
32 3010
35 120
36 2950
41 3858
43 4016
49 3402
50 856
51 3744
52 592
56 4850
57 2078
59 3532
63 3406
64 3802
65 4980
69 1123
71 1152
72 4170
73 4...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1750

Test #7:

score: 5
Accepted
time: 0ms = 0ms + 0ms
memory: 1856kb,1848kb

input:

5
4878

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

output:

6
4980 2495
1 423
2 1922
3 1030
4 1513
4 1906
4 2561
4 2667
4 2948
4 3147
4 3566
4 4605
5 3234
6 2359
8 1808
9 930
13 414
16 1691
16 1699
16 1979
16 2013
16 2969
16 3421
16 4817
17 270
18 4310
19 2914
20 1009
22 288
22 468
22 619
22 954
22 1091
22 1599
22 2296
22 3266
22 3986
22 4134
22 4188
23 2588...

input:

6
4980 2495
1 423
2 1922
3 1030
4 1513
4 1906
4 2561
4 2667
4 2948
4 3147
4 3566
4 4605
5 3234
6 2359
8 1808
9 930
13 414
16 1691
16 1699
16 1979
16 2013
16 2969
16 3421
16 4817
17 270
18 4310
19 2914
20 1009
22 288
22 468
22 619
22 954
22 1091
22 1599
22 2296
22 3266
22 3986
22 4134
22 4188
23 2588...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4878

Test #8:

score: 5
Accepted
time: 1ms = 1ms + 0ms
memory: 1856kb,1844kb

input:

5
1223

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4980
4871 3216
4871 3633
4871 4561
4871 3259
4871 2545
4871 1590
4871 1169
1217 847
1217 4522
1217 886
1217 2506
1217 3076
1217 2613
1217 1940
2725 4860
2725 874
2725 81...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4980
4871 3216
4871 3633
4871 4561
4871 3259
4871 2545
4871 1590
4871 1169
1217 847
1217 4522
1217 886
1217 2506
1217 3076
1217 2613
1217 1940
2725 4860
2725 874
2725 81...

output:

6
4980 2530
2 1922
4 1513
4 1858
4 1906
4 2204
4 2561
4 2667
4 2948
4 3566
4 4605
5 3234
6 1738
7 2010
8 373
8 910
8 2195
8 2709
8 3514
8 4276
8 4414
8 4563
11 4888
12 3384
15 2276
16 3406
18 4310
20 2725
21 3624
22 288
22 414
22 619
22 954
22 1091
22 1599
22 3040
22 3266
22 4134
23 2588
24 4890
26 ...

input:

6
4980 2530
2 1922
4 1513
4 1858
4 1906
4 2204
4 2561
4 2667
4 2948
4 3566
4 4605
5 3234
6 1738
7 2010
8 373
8 910
8 2195
8 2709
8 3514
8 4276
8 4414
8 4563
11 4888
12 3384
15 2276
16 3406
18 4310
20 2725
21 3624
22 288
22 414
22 619
22 954
22 1091
22 1599
22 3040
22 3266
22 4134
23 2588
24 4890
26 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1223

Test #9:

score: 5
Accepted
time: 0ms = 0ms + 0ms
memory: 1856kb,1844kb

input:

5
648

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

output:

6
4980 2538
1 674
2 560
3 556
4 1023
4 1707
4 1736
4 1835
4 2378
4 3516
4 4902
5 94
6 4336
7 536
8 1038
9 1048
10 2482
12 3384
13 1682
14 178
15 406
16 842
17 1598
18 58
18 1799
18 1848
18 2135
18 2570
18 2853
18 3121
20 364
22 2432
23 2750
26 3806
27 2386
28 4068
30 3789
31 3052
34 1072
35 2538
36 ...

input:

6
4980 2538
1 674
2 560
3 556
4 1023
4 1707
4 1736
4 1835
4 2378
4 3516
4 4902
5 94
6 4336
7 536
8 1038
9 1048
10 2482
12 3384
13 1682
14 178
15 406
16 842
17 1598
18 58
18 1799
18 1848
18 2135
18 2570
18 2853
18 3121
20 364
22 2432
23 2750
26 3806
27 2386
28 4068
30 3789
31 3052
34 1072
35 2538
36 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
648

Test #10:

score: 5
Accepted
time: 0ms = 0ms + 0ms
memory: 1856kb,1844kb

input:

7
4475

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4980
4871 3216
4871 3633
4871 4561
4871 3259
4871 2545
4871 1590
4871 1169
1217 847
1217 4522
1217 886
1217 2506
1217 3076
1217 2613
1217 1940
2725 4860
2725 874
2725 81...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4980
4871 3216
4871 3633
4871 4561
4871 3259
4871 2545
4871 1590
4871 1169
1217 847
1217 4522
1217 886
1217 2506
1217 3076
1217 2613
1217 1940
2725 4860
2725 874
2725 81...

output:

8
4980 2490
1 544
2 3816
4 2160
5 3254
9 930
10 834
11 498
12 3272
14 204
15 1242
16 4502
17 78
19 930
20 926
20 1674
20 1930
20 1953
20 3838
20 4218
20 4750
23 2220
24 3086
25 2366
26 4844
27 1054
29 1486
30 1502
33 3313
36 4933
37 2470
39 1682
41 236
41 1583
41 1793
41 2534
41 2932
41 3927
41 4819...

input:

8
4980 2490
1 544
2 3816
4 2160
5 3254
9 930
10 834
11 498
12 3272
14 204
15 1242
16 4502
17 78
19 930
20 926
20 1674
20 1930
20 1953
20 3838
20 4218
20 4750
23 2220
24 3086
25 2366
26 4844
27 1054
29 1486
30 1502
33 3313
36 4933
37 2470
39 1682
41 236
41 1583
41 1793
41 2534
41 2932
41 3927
41 4819...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4475

Test #11:

score: 5
Accepted
time: 1ms = 1ms + 0ms
memory: 1860kb,1844kb

input:

7
4240

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

output:

8
4980 2490
1 430
2 1046
4 1024
5 94
6 367
6 638
6 1715
6 2017
7 1830
12 3272
16 1061
16 1126
16 1302
16 1381
16 1961
16 2266
16 2281
17 2444
19 3026
21 112
24 415
24 1725
24 1801
24 3642
25 4594
26 1976
28 438
30 2523
31 1924
35 884
37 800
38 839
38 1765
38 2942
38 2944
38 4410
38 4792
38 4946
39 1...

input:

8
4980 2490
1 430
2 1046
4 1024
5 94
6 367
6 638
6 1715
6 2017
7 1830
12 3272
16 1061
16 1126
16 1302
16 1381
16 1961
16 2266
16 2281
17 2444
19 3026
21 112
24 415
24 1725
24 1801
24 3642
25 4594
26 1976
28 438
30 2523
31 1924
35 884
37 800
38 839
38 1765
38 2942
38 2944
38 4410
38 4792
38 4946
39 1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4240

Test #12:

score: 5
Accepted
time: 0ms = 0ms + 0ms
memory: 1856kb,1844kb

input:

7
1291

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4980
4871 3216
4871 3633
4871 4561
4871 3259
4871 2545
4871 1590
4871 1169
1217 847
1217 4522
1217 886
1217 2506
1217 3076
1217 2613
1217 1940
2725 4860
2725 874
2725 81...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4980
4871 3216
4871 3633
4871 4561
4871 3259
4871 2545
4871 1590
4871 1169
1217 847
1217 4522
1217 886
1217 2506
1217 3076
1217 2613
1217 1940
2725 4860
2725 874
2725 81...

output:

8
4980 2490
4 565
4 972
4 1210
4 1368
4 4090
4 4589
6 2048
7 2010
8 1998
9 930
11 538
12 756
13 256
15 478
17 2834
18 2272
19 930
20 2202
21 4206
25 32
26 352
26 643
26 1142
26 1571
26 1909
26 2298
26 3359
27 3670
29 342
30 4280
31 2300
32 1007
32 2011
32 3239
32 3374
32 3713
32 4762
34 2660
35 2538...

input:

8
4980 2490
4 565
4 972
4 1210
4 1368
4 4090
4 4589
6 2048
7 2010
8 1998
9 930
11 538
12 756
13 256
15 478
17 2834
18 2272
19 930
20 2202
21 4206
25 32
26 352
26 643
26 1142
26 1571
26 1909
26 2298
26 3359
27 3670
29 342
30 4280
31 2300
32 1007
32 2011
32 3239
32 3374
32 3713
32 4762
34 2660
35 2538...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1291

Subtask #2:

score: 30
Accepted

Test #13:

score: 30
Accepted
time: 1ms = 1ms + 0ms
memory: 1856kb,1872kb

input:

1
17476204

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

output:

2
4980 4413
1 1493
2 4941
4 4605
5 3254
6 4552
7 2765
8 66
8 792
8 2188
8 3068
8 3796
8 4567
8 4783
9 4140
10 4320
11 4372
12 122
13 1662
14 2469
15 202
16 1030
16 1979
16 2200
16 3421
16 3556
16 3670
16 3961
16 4388
16 4817
17 1978
18 63
18 911
18 2570
18 4239
18 4269
18 4310
18 4635
19 4454
20 748...

input:

2
4980 4413
1 1493
2 4941
4 4605
5 3254
6 4552
7 2765
8 66
8 792
8 2188
8 3068
8 3796
8 4567
8 4783
9 4140
10 4320
11 4372
12 122
13 1662
14 2469
15 202
16 1030
16 1979
16 2200
16 3421
16 3556
16 3670
16 3961
16 4388
16 4817
17 1978
18 63
18 911
18 2570
18 4239
18 4269
18 4310
18 4635
19 4454
20 748...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
17476204

Test #14:

score: 30
Accepted
time: 1ms = 1ms + 0ms
memory: 1856kb,1876kb

input:

1
11926600

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

output:

2
4980 4413
3 2220
4 972
5 63
6 3077
7 4974
8 373
8 1841
8 2440
8 2477
8 2880
8 2954
8 3354
8 3528
8 4567
8 4783
9 2868
11 3424
12 3974
13 4690
14 4974
16 1907
17 4264
18 4577
19 2868
20 3958
21 2578
22 3844
23 4560
24 4732
25 1440
26 1142
26 1210
26 1234
26 1257
26 1263
26 1582
26 1888
26 2220
26 2...

input:

2
4980 4413
3 2220
4 972
5 63
6 3077
7 4974
8 373
8 1841
8 2440
8 2477
8 2880
8 2954
8 3354
8 3528
8 4567
8 4783
9 2868
11 3424
12 3974
13 4690
14 4974
16 1907
17 4264
18 4577
19 2868
20 3958
21 2578
22 3844
23 4560
24 4732
25 1440
26 1142
26 1210
26 1234
26 1257
26 1263
26 1582
26 1888
26 2220
26 2...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
11926600

Test #15:

score: 30
Accepted
time: 0ms = 0ms + 0ms
memory: 1856kb,1880kb

input:

1
16602378

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

output:

2
4980 4413
1 4884
2 1922
3 1932
4 2904
5 2135
6 1715
7 275
8 1118
9 2744
11 4342
13 740
14 275
15 3674
16 3961
17 1380
18 3291
19 4656
20 550
22 267
22 428
22 664
22 1133
22 1599
22 3537
22 3995
23 2354
24 520
24 752
24 1184
24 1445
24 1591
24 1648
24 1662
24 2754
24 3238
24 3662
25 1440
26 201
26 ...

input:

2
4980 4413
1 4884
2 1922
3 1932
4 2904
5 2135
6 1715
7 275
8 1118
9 2744
11 4342
13 740
14 275
15 3674
16 3961
17 1380
18 3291
19 4656
20 550
22 267
22 428
22 664
22 1133
22 1599
22 3537
22 3995
23 2354
24 520
24 752
24 1184
24 1445
24 1591
24 1648
24 1662
24 2754
24 3238
24 3662
25 1440
26 201
26 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
16602378

Test #16:

score: 30
Accepted
time: 1ms = 1ms + 0ms
memory: 1856kb,1844kb

input:

3
13129243

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4980
4871 3216
4871 3633
4871 4561
4871 3259
4871 2545
4871 1590
4871 1169
1217 847
1217 4522
1217 886
1217 2506
1217 3076
1217 2613
1217 1940
2725 4860
2725 874
2725 81...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4980
4871 3216
4871 3633
4871 4561
4871 3259
4871 2545
4871 1590
4871 1169
1217 847
1217 4522
1217 886
1217 2506
1217 3076
1217 2613
1217 1940
2725 4860
2725 874
2725 81...

output:

4
4980 2490
3 2750
4 3014
6 2284
10 4320
11 3054
14 673
15 1668
17 2444
18 4635
22 1838
23 2220
24 3498
25 4138
29 4006
30 804
32 3786
33 3313
34 3822
36 1946
38 3784
39 1378
41 1977
42 4309
43 4470
44 1560
44 1594
44 2104
44 2218
44 3429
44 4684
46 4446
47 1786
50 4721
51 3409
53 4721
54 4452
57 28...

input:

4
4980 2490
3 2750
4 3014
6 2284
10 4320
11 3054
14 673
15 1668
17 2444
18 4635
22 1838
23 2220
24 3498
25 4138
29 4006
30 804
32 3786
33 3313
34 3822
36 1946
38 3784
39 1378
41 1977
42 4309
43 4470
44 1560
44 1594
44 2104
44 2218
44 3429
44 4684
46 4446
47 1786
50 4721
51 3409
53 4721
54 4452
57 28...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
13129243

Test #17:

score: 30
Accepted
time: 0ms = 0ms + 0ms
memory: 1860kb,1840kb

input:

3
7892141

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4980
4871 3216
4871 3633
4871 4561
4871 3259
4871 2545
4871 1590
4871 1169
1217 847
1217 4522
1217 886
1217 2506
1217 3076
1217 2613
1217 1940
2725 4860
2725 874
2725 81...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4980
4871 3216
4871 3633
4871 4561
4871 3259
4871 2545
4871 1590
4871 1169
1217 847
1217 4522
1217 886
1217 2506
1217 3076
1217 2613
1217 1940
2725 4860
2725 874
2725 81...

output:

4
4980 2490
5 2738
6 1734
10 1636
12 1746
13 3160
17 772
19 2680
21 934
23 4174
26 1770
27 2540
28 3892
29 104
32 3786
33 3474
34 2411
36 1782
38 393
38 661
38 843
38 1308
38 2985
38 3411
39 1682
40 4648
41 4400
44 4684
46 3557
48 3264
49 1283
49 2237
49 2310
49 3155
49 3996
49 4953
50 4721
51 4638
...

input:

4
4980 2490
5 2738
6 1734
10 1636
12 1746
13 3160
17 772
19 2680
21 934
23 4174
26 1770
27 2540
28 3892
29 104
32 3786
33 3474
34 2411
36 1782
38 393
38 661
38 843
38 1308
38 2985
38 3411
39 1682
40 4648
41 4400
44 4684
46 3557
48 3264
49 1283
49 2237
49 2310
49 3155
49 3996
49 4953
50 4721
51 4638
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
7892141

Test #18:

score: 30
Accepted
time: 0ms = 0ms + 0ms
memory: 1852kb,1848kb

input:

3
21314775

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4980
4871 3216
4871 3633
4871 4561
4871 3259
4871 2545
4871 1590
4871 1169
1217 847
1217 4522
1217 886
1217 2506
1217 3076
1217 2613
1217 1940
2725 4860
2725 874
2725 81...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4980
4871 3216
4871 3633
4871 4561
4871 3259
4871 2545
4871 1590
4871 1169
1217 847
1217 4522
1217 886
1217 2506
1217 3076
1217 2613
1217 1940
2725 4860
2725 874
2725 81...

output:

4
4980 2490
1 4362
2 392
2 1223
2 2716
2 3449
2 4621
2 4941
3 2504
4 1906
8 610
9 2500
13 800
14 894
15 4542
16 4817
17 4426
18 1858
25 2604
26 2980
28 3100
28 3509
28 3892
28 4059
28 4286
28 4944
30 3459
32 3178
33 3319
36 1982
38 4834
39 800
42 551
44 3830
45 1308
47 3854
48 2460
49 3651
50 894
52...

input:

4
4980 2490
1 4362
2 392
2 1223
2 2716
2 3449
2 4621
2 4941
3 2504
4 1906
8 610
9 2500
13 800
14 894
15 4542
16 4817
17 4426
18 1858
25 2604
26 2980
28 3100
28 3509
28 3892
28 4059
28 4286
28 4944
30 3459
32 3178
33 3319
36 1982
38 4834
39 800
42 551
44 3830
45 1308
47 3854
48 2460
49 3651
50 894
52...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
21314775

Test #19:

score: 30
Accepted
time: 0ms = 0ms + 0ms
memory: 1864kb,1844kb

input:

5
5559540

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

output:

6
4980 2522
1 2468
4 972
5 156
11 4342
12 2276
15 1094
16 1907
17 3994
18 2272
20 4532
21 1788
22 106
23 1286
24 1788
25 3228
26 541
26 782
26 1749
26 3359
26 3652
26 3797
27 1641
31 2236
33 2713
34 2860
35 783
37 2470
38 3500
41 4262
42 173
43 4084
45 4946
46 301
46 1213
46 1296
46 1762
46 2153
46 ...

input:

6
4980 2522
1 2468
4 972
5 156
11 4342
12 2276
15 1094
16 1907
17 3994
18 2272
20 4532
21 1788
22 106
23 1286
24 1788
25 3228
26 541
26 782
26 1749
26 3359
26 3652
26 3797
27 1641
31 2236
33 2713
34 2860
35 783
37 2470
38 3500
41 4262
42 173
43 4084
45 4946
46 301
46 1213
46 1296
46 1762
46 2153
46 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
5559540

Test #20:

score: 30
Accepted
time: 0ms = 0ms + 0ms
memory: 1856kb,1840kb

input:

5
9424319

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4980
4871 3216
4871 3633
4871 4561
4871 3259
4871 2545
4871 1590
4871 1169
1217 847
1217 4522
1217 886
1217 2506
1217 3076
1217 2613
1217 1940
2725 4860
2725 874
2725 81...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4980
4871 3216
4871 3633
4871 4561
4871 3259
4871 2545
4871 1590
4871 1169
1217 847
1217 4522
1217 886
1217 2506
1217 3076
1217 2613
1217 1940
2725 4860
2725 874
2725 81...

output:

6
4980 2526
1 4362
2 651
4 2667
6 3077
7 14
7 53
7 998
7 2562
7 2612
7 3543
7 4000
8 373
8 2297
8 2623
8 2805
8 4120
8 4563
8 4793
9 492
10 1634
12 2207
12 2304
12 2530
12 3085
12 3436
12 3812
12 3950
12 4334
12 4765
16 4005
17 4564
18 2471
19 136
20 222
20 378
20 384
20 1744
20 1953
20 2278
20 3611...

input:

6
4980 2526
1 4362
2 651
4 2667
6 3077
7 14
7 53
7 998
7 2562
7 2612
7 3543
7 4000
8 373
8 2297
8 2623
8 2805
8 4120
8 4563
8 4793
9 492
10 1634
12 2207
12 2304
12 2530
12 3085
12 3436
12 3812
12 3950
12 4334
12 4765
16 4005
17 4564
18 2471
19 136
20 222
20 378
20 384
20 1744
20 1953
20 2278
20 3611...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
9424319

Test #21:

score: 30
Accepted
time: 1ms = 1ms + 0ms
memory: 1860kb,1840kb

input:

5
10955780

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

output:

6
4980 2494
2 1078
5 4555
7 178
8 2195
8 2558
8 2623
8 2696
8 3301
8 3795
8 4567
9 3578
11 4890
12 449
12 1129
12 3947
12 3999
12 4229
12 4537
14 178
18 883
20 748
21 1612
24 519
24 1081
24 2605
24 2991
24 3977
24 4905
30 66
32 81
32 747
32 1007
32 1250
32 1791
32 3336
32 4138
38 3500
40 4576
42 111...

input:

6
4980 2494
2 1078
5 4555
7 178
8 2195
8 2558
8 2623
8 2696
8 3301
8 3795
8 4567
9 3578
11 4890
12 449
12 1129
12 3947
12 3999
12 4229
12 4537
14 178
18 883
20 748
21 1612
24 519
24 1081
24 2605
24 2991
24 3977
24 4905
30 66
32 81
32 747
32 1007
32 1250
32 1791
32 3336
32 4138
38 3500
40 4576
42 111...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
10955780

Test #22:

score: 30
Accepted
time: 1ms = 1ms + 0ms
memory: 1860kb,1840kb

input:

7
19938721

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4980
4871 3216
4871 3633
4871 4561
4871 3259
4871 2545
4871 1590
4871 1169
1217 847
1217 4522
1217 886
1217 2506
1217 3076
1217 2613
1217 1940
2725 4860
2725 874
2725 81...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4980
4871 3216
4871 3633
4871 4561
4871 3259
4871 2545
4871 1590
4871 1169
1217 847
1217 4522
1217 886
1217 2506
1217 3076
1217 2613
1217 1940
2725 4860
2725 874
2725 81...

output:

8
4980 2490
1 1958
2 334
2 1320
2 1992
2 2598
2 2665
3 3848
4 273
4 565
4 1024
4 1936
4 2093
4 2453
4 4589
6 2108
6 3207
6 4103
6 4729
6 4964
8 864
9 3308
11 3218
14 4666
15 4510
17 1598
20 510
22 2432
24 3456
25 2180
27 1126
29 2144
32 1916
34 947
36 2343
37 3064
40 4648
41 163
41 500
41 1629
41 38...

input:

8
4980 2490
1 1958
2 334
2 1320
2 1992
2 2598
2 2665
3 3848
4 273
4 565
4 1024
4 1936
4 2093
4 2453
4 4589
6 2108
6 3207
6 4103
6 4729
6 4964
8 864
9 3308
11 3218
14 4666
15 4510
17 1598
20 510
22 2432
24 3456
25 2180
27 1126
29 2144
32 1916
34 947
36 2343
37 3064
40 4648
41 163
41 500
41 1629
41 38...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
19938721

Test #23:

score: 30
Accepted
time: 1ms = 1ms + 0ms
memory: 1860kb,1840kb

input:

7
5129508

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

output:

8
4980 2490
2 4698
4 1707
5 1324
7 4951
11 534
12 1117
12 1273
12 1890
12 3546
12 4083
12 4195
12 4229
15 4542
17 1598
18 911
18 999
18 1481
18 2397
18 3143
18 4267
20 378
21 476
22 428
25 3242
29 2144
30 248
31 2236
33 2362
38 2762
40 4576
41 4818
43 3422
44 2218
45 2762
47 802
48 936
49 3402
50 22...

input:

8
4980 2490
2 4698
4 1707
5 1324
7 4951
11 534
12 1117
12 1273
12 1890
12 3546
12 4083
12 4195
12 4229
15 4542
17 1598
18 911
18 999
18 1481
18 2397
18 3143
18 4267
20 378
21 476
22 428
25 3242
29 2144
30 248
31 2236
33 2362
38 2762
40 4576
41 4818
43 3422
44 2218
45 2762
47 802
48 936
49 3402
50 22...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
5129508

Test #24:

score: 30
Accepted
time: 1ms = 1ms + 0ms
memory: 1856kb,1840kb

input:

7
15332941

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4980
4871 3216
4871 3633
4871 4561
4871 3259
4871 2545
4871 1590
4871 1169
1217 847
1217 4522
1217 886
1217 2506
1217 3076
1217 2613
1217 1940
2725 4860
2725 874
2725 81...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4980
4871 3216
4871 3633
4871 4561
4871 3259
4871 2545
4871 1590
4871 1169
1217 847
1217 4522
1217 886
1217 2506
1217 3076
1217 2613
1217 1940
2725 4860
2725 874
2725 81...

output:

8
4980 2490
1 2047
2 467
3 2750
5 63
6 3207
9 3088
10 4320
12 4820
13 3160
15 1668
17 2444
19 422
20 378
21 2076
23 2220
28 4286
29 4006
30 3908
31 2300
33 3474
34 3609
37 3160
40 4648
43 4470
46 1012
46 1597
46 2586
46 2817
46 3557
46 4769
47 2925
48 55
48 447
48 700
48 951
48 1962
48 3075
48 3363
...

input:

8
4980 2490
1 2047
2 467
3 2750
5 63
6 3207
9 3088
10 4320
12 4820
13 3160
15 1668
17 2444
19 422
20 378
21 2076
23 2220
28 4286
29 4006
30 3908
31 2300
33 3474
34 3609
37 3160
40 4648
43 4470
46 1012
46 1597
46 2586
46 2817
46 3557
46 4769
47 2925
48 55
48 447
48 700
48 951
48 1962
48 3075
48 3363
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
15332941

Subtask #3:

score: 65
Accepted

Test #25:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 1856kb,1876kb

input:

1
355365355024496523

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4980
4871 3216
4871 3633
4871 4561
4871 3259
4871 2545
4871 1590
4871 1169
1217 847
1217 4522
1217 886
1217 2506
1217 3076
1217 2613
1217 1940
2725 4860
2725 874
2725 81...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4980
4871 3216
4871 3633
4871 4561
4871 3259
4871 2545
4871 1590
4871 1169
1217 847
1217 4522
1217 886
1217 2506
1217 3076
1217 2613
1217 1940
2725 4860
2725 874
2725 81...

output:

2
4980 4413
1 3311
3 1030
4 1467
5 439
6 1275
7 2054
8 2709
9 1048
10 2263
11 534
12 3392
13 800
13 1407
13 2131
13 2423
13 3141
13 3389
13 3427
13 3556
13 3861
13 3918
14 613
14 1347
14 1353
14 3250
14 3425
14 4135
14 4200
15 3138
16 4413
17 3033
18 439
20 1930
21 495
22 3761
23 1584
24 752
24 887
...

input:

2
4980 4413
1 3311
3 1030
4 1467
5 439
6 1275
7 2054
8 2709
9 1048
10 2263
11 534
12 3392
13 800
13 1407
13 2131
13 2423
13 3141
13 3389
13 3427
13 3556
13 3861
13 3918
14 613
14 1347
14 1353
14 3250
14 3425
14 4135
14 4200
15 3138
16 4413
17 3033
18 439
20 1930
21 495
22 3761
23 1584
24 752
24 887
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
355365355024496523

Test #26:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 1860kb,1872kb

input:

1
727827999106414164

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

output:

2
4980 4413
1 923
2 3056
3 3983
4 4855
5 1858
6 2268
7 998
8 4262
9 147
12 3558
13 1116
14 4774
15 1702
17 3107
18 2115
18 2272
18 3143
18 3406
18 4269
18 4555
19 343
20 1686
21 476
22 3955
23 4623
25 626
26 845
27 2200
28 1941
29 1721
30 260
31 802
31 1202
31 2092
31 2300
31 2405
31 2413
31 2812
31...

input:

2
4980 4413
1 923
2 3056
3 3983
4 4855
5 1858
6 2268
7 998
8 4262
9 147
12 3558
13 1116
14 4774
15 1702
17 3107
18 2115
18 2272
18 3143
18 3406
18 4269
18 4555
19 343
20 1686
21 476
22 3955
23 4623
25 626
26 845
27 2200
28 1941
29 1721
30 260
31 802
31 1202
31 2092
31 2300
31 2405
31 2413
31 2812
31...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
727827999106414164

Test #27:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 1852kb,1876kb

input:

1
656410143989222955

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4980
4871 3216
4871 3633
4871 4561
4871 3259
4871 2545
4871 1590
4871 1169
1217 847
1217 4522
1217 886
1217 2506
1217 3076
1217 2613
1217 1940
2725 4860
2725 874
2725 81...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4980
4871 3216
4871 3633
4871 4561
4871 3259
4871 2545
4871 1590
4871 1169
1217 847
1217 4522
1217 886
1217 2506
1217 3076
1217 2613
1217 1940
2725 4860
2725 874
2725 81...

output:

2
4980 4413
1 1042
1 1578
1 1588
1 1816
1 2548
1 3304
1 4291
1 4884
2 2691
4 2704
5 4934
6 2268
7 4666
8 4084
9 2935
10 4152
11 168
12 4628
13 1545
14 4666
15 1242
16 4854
17 788
18 291
18 1704
18 2314
18 2973
18 3081
18 3979
19 297
20 2005
21 2801
22 1091
25 3228
26 2404
27 3124
28 1986
28 2403
28 ...

input:

2
4980 4413
1 1042
1 1578
1 1588
1 1816
1 2548
1 3304
1 4291
1 4884
2 2691
4 2704
5 4934
6 2268
7 4666
8 4084
9 2935
10 4152
11 168
12 4628
13 1545
14 4666
15 1242
16 4854
17 788
18 291
18 1704
18 2314
18 2973
18 3081
18 3979
19 297
20 2005
21 2801
22 1091
25 3228
26 2404
27 3124
28 1986
28 2403
28 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
656410143989222955

Test #28:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 1856kb,1876kb

input:

1
410366615149657534

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

output:

2
4980 4413
1 430
2 651
3 1262
4 1906
5 3291
6 3572
7 14
7 53
7 998
7 2562
7 2612
7 4000
8 373
8 1140
8 2195
8 2709
8 3514
8 4276
8 4414
9 4856
10 1408
11 498
11 752
11 2454
11 2507
11 2605
11 3282
11 3767
11 3977
12 756
13 3204
17 2087
18 1269
19 946
20 1001
21 2076
22 368
23 3368
24 161
25 4762
26...

input:

2
4980 4413
1 430
2 651
3 1262
4 1906
5 3291
6 3572
7 14
7 53
7 998
7 2562
7 2612
7 4000
8 373
8 1140
8 2195
8 2709
8 3514
8 4276
8 4414
9 4856
10 1408
11 498
11 752
11 2454
11 2507
11 2605
11 3282
11 3767
11 3977
12 756
13 3204
17 2087
18 1269
19 946
20 1001
21 2076
22 368
23 3368
24 161
25 4762
26...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
410366615149657534

Test #29:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 1856kb,1876kb

input:

1
298090682780948428

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

output:

2
4980 4413
1 4751
2 176
3 2588
4 1951
5 1858
6 1215
7 4110
8 2297
9 149
10 3972
11 4888
12 2790
13 414
14 894
14 940
14 2765
14 4135
14 4974
16 868
17 555
18 4480
20 1466
21 2662
22 2149
24 4890
25 2262
26 1491
27 4850
28 1943
29 2031
30 2481
31 1913
32 4594
33 1282
34 2698
35 226
36 4111
37 1116
3...

input:

2
4980 4413
1 4751
2 176
3 2588
4 1951
5 1858
6 1215
7 4110
8 2297
9 149
10 3972
11 4888
12 2790
13 414
14 894
14 940
14 2765
14 4135
14 4974
16 868
17 555
18 4480
20 1466
21 2662
22 2149
24 4890
25 2262
26 1491
27 4850
28 1943
29 2031
30 2481
31 1913
32 4594
33 1282
34 2698
35 226
36 4111
37 1116
3...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
298090682780948428

Test #30:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 1860kb,1844kb

input:

3
969441916331132577

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4980
4871 3216
4871 3633
4871 4561
4871 3259
4871 2545
4871 1590
4871 1169
1217 847
1217 4522
1217 886
1217 2506
1217 3076
1217 2613
1217 1940
2725 4860
2725 874
2725 81...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4980
4871 3216
4871 3633
4871 4561
4871 3259
4871 2545
4871 1590
4871 1169
1217 847
1217 4522
1217 886
1217 2506
1217 3076
1217 2613
1217 1940
2725 4860
2725 874
2725 81...

output:

4
4980 2490
10 3517
13 4677
15 2276
17 555
18 888
25 221
27 892
29 3720
30 1711
32 1249
36 1454
38 3292
40 4648
41 724
42 3919
44 1811
44 2854
44 3847
44 3855
44 4033
44 4429
45 1556
50 673
51 2392
52 1934
53 2311
54 2285
55 2460
57 3385
64 2563
65 1996
66 1739
66 1911
66 2521
66 3799
66 4123
66 456...

input:

4
4980 2490
10 3517
13 4677
15 2276
17 555
18 888
25 221
27 892
29 3720
30 1711
32 1249
36 1454
38 3292
40 4648
41 724
42 3919
44 1811
44 2854
44 3847
44 3855
44 4033
44 4429
45 1556
50 673
51 2392
52 1934
53 2311
54 2285
55 2460
57 3385
64 2563
65 1996
66 1739
66 1911
66 2521
66 3799
66 4123
66 456...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
969441916331132577

Test #31:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 1856kb,1840kb

input:

3
929489812741933634

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

output:

4
4980 2490
2 1073
5 443
6 2441
8 2709
12 3491
13 3141
14 4846
17 1435
18 443
20 3958
21 2897
22 2526
24 3498
28 2610
31 1016
32 3713
36 4418
38 4792
42 1785
43 3481
45 644
47 4438
49 1213
51 2150
52 1934
58 1049
59 3153
60 2943
63 3873
66 3032
67 3481
70 1971
71 2782
72 2783
73 157
73 480
73 2470
7...

input:

4
4980 2490
2 1073
5 443
6 2441
8 2709
12 3491
13 3141
14 4846
17 1435
18 443
20 3958
21 2897
22 2526
24 3498
28 2610
31 1016
32 3713
36 4418
38 4792
42 1785
43 3481
45 644
47 4438
49 1213
51 2150
52 1934
58 1049
59 3153
60 2943
63 3873
66 3032
67 3481
70 1971
71 2782
72 2783
73 157
73 480
73 2470
7...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
929489812741933634

Test #32:

score: 65
Accepted
time: 0ms = 0ms + 0ms
memory: 1852kb,1840kb

input:

3
144032041325838295

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4980
4871 3216
4871 3633
4871 4561
4871 3259
4871 2545
4871 1590
4871 1169
1217 847
1217 4522
1217 886
1217 2506
1217 3076
1217 2613
1217 1940
2725 4860
2725 874
2725 81...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4980
4871 3216
4871 3633
4871 4561
4871 3259
4871 2545
4871 1590
4871 1169
1217 847
1217 4522
1217 886
1217 2506
1217 3076
1217 2613
1217 1940
2725 4860
2725 874
2725 81...

output:

4
4980 2490
2 4282
3 1584
4 1368
6 367
6 501
6 2924
6 4301
6 4789
6 4790
7 4774
8 3221
9 3026
10 3703
11 4287
12 4537
15 4542
16 182
16 832
16 1699
16 1779
16 2969
16 3835
17 3950
18 911
20 1697
22 106
23 1892
24 1081
27 2540
28 1941
29 4493
30 3459
32 3178
34 4705
35 3486
36 2677
37 1351
38 1463
40...

input:

4
4980 2490
2 4282
3 1584
4 1368
6 367
6 501
6 2924
6 4301
6 4789
6 4790
7 4774
8 3221
9 3026
10 3703
11 4287
12 4537
15 4542
16 182
16 832
16 1699
16 1779
16 2969
16 3835
17 3950
18 911
20 1697
22 106
23 1892
24 1081
27 2540
28 1941
29 4493
30 3459
32 3178
34 4705
35 3486
36 2677
37 1351
38 1463
40...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
144032041325838295

Test #33:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 1860kb,1848kb

input:

3
832110946250826180

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4980
1476 656
1476 779
1476 93
1476 4341
1476 3929
1476 2632
1476 503
4004 3216
4004 1680
4004 3256
4004 518
4004 4296
4004 2391
4004 1940
4786 2057
4786 3366
4786 3659
...

output:

4
4980 2490
1 3798
2 791
3 556
3 669
3 833
3 1483
3 1892
3 3276
4 3373
6 1084
8 824
9 492
10 3466
11 593
12 2207
12 2530
12 3085
12 3436
12 3812
12 4765
13 2512
14 2303
16 4587
17 4564
18 4685
20 2091
21 4601
22 267
22 2221
22 2968
22 3389
22 3537
22 3844
24 1575
25 2899
26 1571
27 4755
28 1228
29 2...

input:

4
4980 2490
1 3798
2 791
3 556
3 669
3 833
3 1483
3 1892
3 3276
4 3373
6 1084
8 824
9 492
10 3466
11 593
12 2207
12 2530
12 3085
12 3436
12 3812
12 4765
13 2512
14 2303
16 4587
17 4564
18 4685
20 2091
21 4601
22 267
22 2221
22 2968
22 3389
22 3537
22 3844
24 1575
25 2899
26 1571
27 4755
28 1228
29 2...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
832110946250826180

Test #34:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 1852kb,1844kb

input:

3
85728715707691821

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4980
3929 1823
3929 2415
3929 4741
3929 4860
3929 905
3929 4065
3929 518
847 3216
847 1680
847 3785
847 3633
847 2506
847 1940
847 1590
101 4561
101 3150
101 4871
101 93...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4980
3929 1823
3929 2415
3929 4741
3929 4860
3929 905
3929 4065
3929 518
847 3216
847 1680
847 3785
847 3633
847 2506
847 1940
847 1590
101 4561
101 3150
101 4871
101 93...

output:

4
4980 2490
1 575
4 1513
5 3923
9 657
12 4537
15 2424
17 4254
18 2853
20 1783
21 764
23 1892
24 520
25 3941
26 4536
28 2248
30 3736
32 4131
37 740
39 2512
41 3927
42 551
44 2035
48 4784
49 2274
52 2981
53 673
53 692
53 2010
53 2407
53 3222
53 4951
57 1104
58 4577
60 2093
69 2223
70 1681
71 3567
73 1...

input:

4
4980 2490
1 575
4 1513
5 3923
9 657
12 4537
15 2424
17 4254
18 2853
20 1783
21 764
23 1892
24 520
25 3941
26 4536
28 2248
30 3736
32 4131
37 740
39 2512
41 3927
42 551
44 2035
48 4784
49 2274
52 2981
53 673
53 692
53 2010
53 2407
53 3222
53 4951
57 1104
58 4577
60 2093
69 2223
70 1681
71 3567
73 1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
85728715707691821

Test #35:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 1852kb,1840kb

input:

5
777434612360931036

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4980
2496 779
2496 1680
2496 503
2496 4561
2496 2613
2496 93
2496 2545
4918 4875
4918 2666
4918 231
4918 3637
4918 736
4918 915
4918 3886
4710 1169
4710 4423
4710 2415
4...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4980
2496 779
2496 1680
2496 503
2496 4561
2496 2613
2496 93
2496 2545
4918 4875
4918 2666
4918 231
4918 3637
4918 736
4918 915
4918 3886
4710 1169
4710 4423
4710 2415
4...

output:

6
4980 2547
2 3423
3 559
4 1536
5 1049
6 3717
8 4793
9 2324
10 383
11 4121
12 938
12 1341
12 1592
12 2225
12 3491
12 4195
12 4359
16 3835
19 4100
21 3045
23 109
23 682
23 1231
23 1262
23 1993
23 2259
23 2393
23 2745
23 4954
24 1245
25 3336
26 773
29 3720
30 3789
32 2167
36 3038
37 1688
38 1022
40 39...

input:

6
4980 2547
2 3423
3 559
4 1536
5 1049
6 3717
8 4793
9 2324
10 383
11 4121
12 938
12 1341
12 1592
12 2225
12 3491
12 4195
12 4359
16 3835
19 4100
21 3045
23 109
23 682
23 1231
23 1262
23 1993
23 2259
23 2393
23 2745
23 4954
24 1245
25 3336
26 773
29 3720
30 3789
32 2167
36 3038
37 1688
38 1022
40 39...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
777434612360931036

Test #36:

score: 65
Accepted
time: 0ms = 0ms + 0ms
memory: 1856kb,1844kb

input:

5
705262511549880222

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4980
2496 779
2496 1680
2496 503
2496 4561
2496 2613
2496 93
2496 2545
4918 4875
4918 2666
4918 231
4918 3637
4918 736
4918 915
4918 3886
4710 1169
4710 4423
4710 2415
4...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4980
2496 779
2496 1680
2496 503
2496 4561
2496 2613
2496 93
2496 2545
4918 4875
4918 2666
4918 231
4918 3637
4918 736
4918 915
4918 3886
4710 1169
4710 4423
4710 2415
4...

output:

6
4980 2520
1 3233
2 2665
3 3811
4 4907
5 4310
6 4790
10 3035
11 2442
14 4774
15 1242
16 2145
17 3994
19 2914
21 1204
23 1993
24 3369
25 1664
26 2656
27 1979
29 339
29 2294
29 2691
29 2767
29 2938
29 3098
29 3235
29 3998
30 207
32 1398
33 4775
34 1028
36 279
39 4148
40 245
41 866
41 1931
41 2932
41 ...

input:

6
4980 2520
1 3233
2 2665
3 3811
4 4907
5 4310
6 4790
10 3035
11 2442
14 4774
15 1242
16 2145
17 3994
19 2914
21 1204
23 1993
24 3369
25 1664
26 2656
27 1979
29 339
29 2294
29 2691
29 2767
29 2938
29 3098
29 3235
29 3998
30 207
32 1398
33 4775
34 1028
36 279
39 4148
40 245
41 866
41 1931
41 2932
41 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
705262511549880222

Test #37:

score: 65
Accepted
time: 0ms = 0ms + 0ms
memory: 1860kb,1844kb

input:

5
510318082834167951

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4980
3929 1823
3929 2415
3929 4741
3929 4860
3929 905
3929 4065
3929 518
847 3216
847 1680
847 3785
847 3633
847 2506
847 1940
847 1590
101 4561
101 3150
101 4871
101 93...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4980
3929 1823
3929 2415
3929 4741
3929 4860
3929 905
3929 4065
3929 518
847 3216
847 1680
847 3785
847 3633
847 2506
847 1940
847 1590
101 4561
101 3150
101 4871
101 93...

output:

6
4980 2586
2 4759
4 2904
6 357
8 3018
9 327
10 4396
11 294
11 1445
11 2454
11 2605
11 3495
11 3614
11 4108
11 4287
13 256
15 3987
16 182
16 1126
16 2013
16 2386
16 4117
16 4388
18 2471
19 4945
20 1207
21 1338
22 1091
24 1725
27 4176
28 3509
29 1985
30 4467
31 1758
33 4408
34 2411
36 1982
38 3278
39...

input:

6
4980 2586
2 4759
4 2904
6 357
8 3018
9 327
10 4396
11 294
11 1445
11 2454
11 2605
11 3495
11 3614
11 4108
11 4287
13 256
15 3987
16 182
16 1126
16 2013
16 2386
16 4117
16 4388
18 2471
19 4945
20 1207
21 1338
22 1091
24 1725
27 4176
28 3509
29 1985
30 4467
31 1758
33 4408
34 2411
36 1982
38 3278
39...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
510318082834167951

Test #38:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 1860kb,1848kb

input:

5
914858813253258744

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4980
2496 779
2496 1680
2496 503
2496 4561
2496 2613
2496 93
2496 2545
4918 4875
4918 2666
4918 231
4918 3637
4918 736
4918 915
4918 3886
4710 1169
4710 4423
4710 2415
4...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4980
2496 779
2496 1680
2496 503
2496 4561
2496 2613
2496 93
2496 2545
4918 4875
4918 2666
4918 231
4918 3637
4918 736
4918 915
4918 3886
4710 1169
4710 4423
4710 2415
4...

output:

6
4980 2508
2 4977
4 972
6 152
9 1800
9 2324
9 2796
9 3578
9 4454
9 4780
10 1608
14 3543
15 4101
17 3861
18 883
19 3387
21 239
22 3350
23 2259
24 959
26 1422
28 1228
28 1541
28 2171
28 2401
28 3093
28 3100
28 3134
29 4196
31 1475
31 1897
31 2413
31 2873
31 3445
31 3582
31 3946
31 4153
31 4696
31 481...

input:

6
4980 2508
2 4977
4 972
6 152
9 1800
9 2324
9 2796
9 3578
9 4454
9 4780
10 1608
14 3543
15 4101
17 3861
18 883
19 3387
21 239
22 3350
23 2259
24 959
26 1422
28 1228
28 1541
28 2171
28 2401
28 3093
28 3100
28 3134
29 4196
31 1475
31 1897
31 2413
31 2873
31 3445
31 3582
31 3946
31 4153
31 4696
31 481...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
914858813253258744

Test #39:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 1852kb,1848kb

input:

5
659635316746638238

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4980
2496 779
2496 1680
2496 503
2496 4561
2496 2613
2496 93
2496 2545
4918 4875
4918 2666
4918 231
4918 3637
4918 736
4918 915
4918 3886
4710 1169
4710 4423
4710 2415
4...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4980
2496 779
2496 1680
2496 503
2496 4561
2496 2613
2496 93
2496 2545
4918 4875
4918 2666
4918 231
4918 3637
4918 736
4918 915
4918 3886
4710 1169
4710 4423
4710 2415
4...

output:

6
4980 2517
2 1046
5 4389
6 2442
7 4135
8 67
11 2442
12 4083
15 3281
16 27
19 794
20 2005
21 764
23 3632
24 396
24 570
24 1801
24 1805
24 2687
24 2705
24 2754
24 3118
24 3753
27 1054
27 2266
27 2418
27 4413
27 4587
27 4857
32 3239
35 167
37 1576
37 1688
37 1754
37 1873
37 2291
37 2470
37 3771
37 378...

input:

6
4980 2517
2 1046
5 4389
6 2442
7 4135
8 67
11 2442
12 4083
15 3281
16 27
19 794
20 2005
21 764
23 3632
24 396
24 570
24 1801
24 1805
24 2687
24 2705
24 2754
24 3118
24 3753
27 1054
27 2266
27 2418
27 4413
27 4587
27 4857
32 3239
35 167
37 1576
37 1688
37 1754
37 1873
37 2291
37 2470
37 3771
37 378...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
659635316746638238

Test #40:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 1856kb,1848kb

input:

7
858490260563149759

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4980
3929 1823
3929 2415
3929 4741
3929 4860
3929 905
3929 4065
3929 518
847 3216
847 1680
847 3785
847 3633
847 2506
847 1940
847 1590
101 4561
101 3150
101 4871
101 93...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4980
3929 1823
3929 2415
3929 4741
3929 4860
3929 905
3929 4065
3929 518
847 3216
847 1680
847 3785
847 3633
847 2506
847 1940
847 1590
101 4561
101 3150
101 4871
101 93...

output:

8
4980 2490
1 3863
6 2441
8 1229
8 2901
8 3795
8 4276
9 516
10 3933
13 1390
13 1682
13 1790
13 2522
13 3064
13 3113
15 125
15 451
15 1446
15 2616
15 3931
15 4772
16 2205
17 2834
19 4682
20 1783
21 1612
23 1251
24 593
25 1249
26 403
27 1699
28 3443
30 4467
31 3860
32 2277
34 480
34 815
34 1252
34 165...

input:

8
4980 2490
1 3863
6 2441
8 1229
8 2901
8 3795
8 4276
9 516
10 3933
13 1390
13 1682
13 1790
13 2522
13 3064
13 3113
15 125
15 451
15 1446
15 2616
15 3931
15 4772
16 2205
17 2834
19 4682
20 1783
21 1612
23 1251
24 593
25 1249
26 403
27 1699
28 3443
30 4467
31 3860
32 2277
34 480
34 815
34 1252
34 165...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
858490260563149759

Test #41:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 1852kb,1844kb

input:

7
860058643727731209

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4980
3929 1823
3929 2415
3929 4741
3929 4860
3929 905
3929 4065
3929 518
847 3216
847 1680
847 3785
847 3633
847 2506
847 1940
847 1590
101 4561
101 3150
101 4871
101 93...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4980
3929 1823
3929 2415
3929 4741
3929 4860
3929 905
3929 4065
3929 518
847 3216
847 1680
847 3785
847 3633
847 2506
847 1940
847 1590
101 4561
101 3150
101 4871
101 93...

output:

8
4980 2490
1 4291
2 1056
4 3840
7 3742
8 4277
11 2436
12 3556
13 3512
17 1503
17 2431
17 2798
17 2834
17 2987
17 3013
17 4254
18 883
18 999
18 1481
18 2135
18 2853
18 2973
18 3143
21 112
23 1689
24 738
27 2717
30 1198
31 3946
33 4408
37 1116
38 645
40 2592
41 2458
42 445
47 3277
48 2675
49 1727
50 ...

input:

8
4980 2490
1 4291
2 1056
4 3840
7 3742
8 4277
11 2436
12 3556
13 3512
17 1503
17 2431
17 2798
17 2834
17 2987
17 3013
17 4254
18 883
18 999
18 1481
18 2135
18 2853
18 2973
18 3143
21 112
23 1689
24 738
27 2717
30 1198
31 3946
33 4408
37 1116
38 645
40 2592
41 2458
42 445
47 3277
48 2675
49 1727
50 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
860058643727731209

Test #42:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 1860kb,1840kb

input:

7
718861404514377808

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4980
2496 779
2496 1680
2496 503
2496 4561
2496 2613
2496 93
2496 2545
4918 4875
4918 2666
4918 231
4918 3637
4918 736
4918 915
4918 3886
4710 1169
4710 4423
4710 2415
4...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4980
2496 779
2496 1680
2496 503
2496 4561
2496 2613
2496 93
2496 2545
4918 4875
4918 2666
4918 231
4918 3637
4918 736
4918 915
4918 3886
4710 1169
4710 4423
4710 2415
4...

output:

8
4980 2490
1 3304
2 334
3 1883
5 3903
6 2637
8 140
9 2380
10 945
11 738
12 2045
12 2265
12 3392
12 3865
12 3974
12 3976
12 4571
14 4952
16 4850
17 678
18 883
19 4780
20 3851
21 2086
23 2351
23 2588
23 2881
23 3240
23 3437
23 4339
23 4623
25 32
26 4573
27 3670
29 4967
30 1602
31 3467
32 1965
32 3010...

input:

8
4980 2490
1 3304
2 334
3 1883
5 3903
6 2637
8 140
9 2380
10 945
11 738
12 2045
12 2265
12 3392
12 3865
12 3974
12 3976
12 4571
14 4952
16 4850
17 678
18 883
19 4780
20 3851
21 2086
23 2351
23 2588
23 2881
23 3240
23 3437
23 4339
23 4623
25 32
26 4573
27 3670
29 4967
30 1602
31 3467
32 1965
32 3010...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
718861404514377808

Test #43:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 1860kb,1840kb

input:

7
659192688464047828

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4980
2496 779
2496 1680
2496 503
2496 4561
2496 2613
2496 93
2496 2545
4918 4875
4918 2666
4918 231
4918 3637
4918 736
4918 915
4918 3886
4710 1169
4710 4423
4710 2415
4...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4980
2496 779
2496 1680
2496 503
2496 4561
2496 2613
2496 93
2496 2545
4918 4875
4918 2666
4918 231
4918 3637
4918 736
4918 915
4918 3886
4710 1169
4710 4423
4710 2415
4...

output:

8
4980 2490
1 4209
2 75
2 872
2 1778
2 2740
2 3564
2 3938
3 2837
4 3191
5 1434
6 1063
9 4656
10 3534
11 3977
13 913
14 2491
16 1421
18 2272
19 4656
20 1357
21 1204
22 1504
23 1892
23 2351
23 3532
24 3977
25 4138
26 695
28 4059
32 3228
33 197
33 325
33 2373
33 3356
33 3474
33 3552
33 4186
35 1276
40 ...

input:

8
4980 2490
1 4209
2 75
2 872
2 1778
2 2740
2 3564
2 3938
3 2837
4 3191
5 1434
6 1063
9 4656
10 3534
11 3977
13 913
14 2491
16 1421
18 2272
19 4656
20 1357
21 1204
22 1504
23 1892
23 2351
23 3532
24 3977
25 4138
26 695
28 4059
32 3228
33 197
33 325
33 2373
33 3356
33 3474
33 3552
33 4186
35 1276
40 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
659192688464047828

Test #44:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 1860kb,1844kb

input:

7
685730986714800201

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4980
3929 1823
3929 2415
3929 4741
3929 4860
3929 905
3929 4065
3929 518
847 3216
847 1680
847 3785
847 3633
847 2506
847 1940
847 1590
101 4561
101 3150
101 4871
101 93...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4980
3929 1823
3929 2415
3929 4741
3929 4860
3929 905
3929 4065
3929 518
847 3216
847 1680
847 3785
847 3633
847 2506
847 1940
847 1590
101 4561
101 3150
101 4871
101 93...

output:

8
4980 2490
1 4882
2 344
2 360
2 885
2 3006
2 4612
2 4618
2 4941
4 273
4 1281
4 1467
4 2093
4 3014
4 4090
4 4357
5 63
6 4633
7 673
8 1998
8 2735
8 3018
8 3410
8 4283
13 1116
18 3291
20 4711
21 4226
23 2837
25 4900
27 1907
30 912
32 3786
34 1991
37 1752
38 1610
39 4148
42 3980
43 4284
44 3959
47 708
...

input:

8
4980 2490
1 4882
2 344
2 360
2 885
2 3006
2 4612
2 4618
2 4941
4 273
4 1281
4 1467
4 2093
4 3014
4 4090
4 4357
5 63
6 4633
7 673
8 1998
8 2735
8 3018
8 3410
8 4283
13 1116
18 3291
20 4711
21 4226
23 2837
25 4900
27 1907
30 912
32 3786
34 1991
37 1752
38 1610
39 4148
42 3980
43 4284
44 3959
47 708
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
685730986714800201