Record Case Detail

Notes

This function is in beta test. Please help improve it in the issues here.

Stderr


        

Hints

Your answer may be identical to the JOJ answer in the first several lines.

However, you will still get Wrong Answer because the complete output may be longer and there might be errors in the future lines.

Please double check your code to solve this problem and try again.

Your Answer

10580
16802
9327
11331
6758
2005
2368
105
8974
10447
6920
20267
22532
12426
7794
7256
8852
9161
8358
5082
6867
23209
1192
13504
8166
11138
15025
14860
9912
701
7778
17478
4931
14860
3484
8877
1384
4223
229
4594
1207
5448
2541
5109
25332
1961
16179
6724
7059
8810
1883
28315
2572
15186
11740
1882
3806
5180
13838
1134
18937
10505
9441
3341
17160
11626
6620
14402
5086
8404
10055
5628
9563
10850
11722
4916
10299
306
15621
7012
1125
8214
64
2342
6010
4460
4212
9965
1207
2625
13760
16599
20778
8709
2644
971
1516
3274
2570
4796
2524
1045
518
9228
22842
0
20045
6922
2738
23670
4882
1397
17407
4721
13583
11539
3507
5016
10914
477
15518
4936
3082
7039
9912
1920
11
482
9843
2359
4916
2678
6599
7782
2102
14054
854
561
7961
807
6196
6191
8505
7565
6481
14458
11025
8412
8949
14314
5244
1217
6554
1195
24635
6434
288
3571
7707
5653
1611
6463
4743
13295
6304
2239
17576
0
8700
4974
3155
18135
839
2665
375
3132
4088
8778
8909
5354
9782
8214
8769
87
18907
12130
4463
19220
16395
788
11558
3111
4433
4808
14458
7247
2269
1110
1448
1

JOJ Answer

187
109
369
385
626
108
5
3
279
606
266
467
774
370
-12
130
585
312
36
464
288
308
526
60
344
192
208
775
316
-10
106
414
75
775
492
229
347
465
117
271
302
372
788
794
192
1034
321
399
248
37
400
468
529
151
126
380
6
22
29
355
372
524
825
472
418
298
423
358
1129
109
170
140
365
412
159
35
735
306
1199
111
176
61
64
394
108
567
716
235
302
1496
1262
435
151
87
700
352
495
141
61
202
67
464
329
626
1101
-2
531
-8
665
115
327
1291
38
108
479
139
550
316
563
477
333
23
288
407
316
233
-5
351
1104
1441
35
564
81
3
288
1628
152
85
186
79
59
863
173
1248
373
206
1272
571
569
45
-6
85
384
225
494
1174
173
145
-8
134
174
132
124
462
471
-8
567
-2
463
55
1029
469
417
100
69
61
540
232
1358
320
305
61
48
87
46
328
454
411
278
427
137
543
459
498
206
170
469
148
166
624
308
419
1075
135
106
57
342
172
66
352
238
233
-4
41
384
1131
111
406
329
263
342
17
-8
217
982
345
-1
615
471
1358
145
305
823
409
205
43
906
369
552
375
215
260
239
144
296
348
192
70
178
164
549
406
361
243
-3
233
230
312
0
251
73
520
478
802
118
74