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

8442 79
474
15 71
657
10 9
352
42 65
251
3 69
590
41 39
322
49 45
462
76 5
842
42 77
582
11 69
720
47 83
352
0 62
794
67 53
473
75 81
585
38 33
584
2 21
1251
33 2
676
23 75
826
3 71
896
67 72
391
14 74
541
16 10
574
68 48
685
8 33
759
50 43
843
2 20
567
14 18
757
5 82
721
63 0
245
62 58
967
77 39
236
74 35
621
4 11
413
81 76
734
70 79
494
24 80
1450
58 81
806
83 34
920
11 6
764
14 43
830
69 36
448
41 36
593
51 62
312
66 27
532
73 50
513
74 25
719
72 39
491
70 79
494
65 24
745
79 51
669
16 17
86
1 63
637
70 27
622
65 68
499
35 64
350
45 67
596
67 19
436
47 21
1442
46 26
1071
23 19
674
24 77
389
20 53
581
23 3
1013
81 0
676
75 77
579
70 7
629
70 71
843
50 15
654
76 80
2023
30 74
218
52 38
370
70 21
1317
81 66
529
80 64
660
4 70
865
46 81
873
53 29
768
46 4
475
82 64
740
59 73
637
66 43
710
80 6
533
64 32
741
42 66
443
30 52
499
21 63
460
52 6
579
48 23
96
15 13
689
59 64
397
47 33
419
4 9
657
79 56
392
66 32
656
63 4
179
6 55
452
18 12
431
15 44
473
38 36
694
62 48
654
30 17
369
0 30
336
48 80
1556
17 49
548
78

JOJ Answer

474
657
352
251
590
322
462
842
582
720
352
794
473
585
584
1251
676
826
896
391
541
574
685
759
843
567
757
721
245
967
236
621
413
734
494
1450
806
920
764
830
448
593
312
532
513
719
491
494
745
669
86
637
622
499
350
596
436
1442
1071
674
389
581
1013
676
579
629
843
654
2023
218
370
1317
529
660
865
873
768
475
740
637
710
533
741
443
499
460
579
96
689
397
419
657
392
656
179
452
431
473
694
654
369
336
1556
548
1618
638
296
874
585
715
188
324
847
811
413
415
453
656
509
446
416
390
559
840
460
904
407
669
520
584
766
334
514
604
235
731
447
491
1120
802
467
283
321
267
331
464
414
479
487
579
553
581
237
418
875
647
104
985
138
774
1074
343
548
177
397
574
720
804
286
479
429
400
235
525
792
699
599
408
485
260
208
539
62
445
440
861
600
368
822
488
551
481
503
357
421
798
597
1006
440
730
299
588
423
530
654
618
54
761
931
979
631
507
816
452
742
762
596
600
572
459
702
218
817
155
353
250
740
682
358
531
716
372
736
783
641
636
104
630
325
684
432
702
530
675
300
360
580
341
608
423
382
760
757
501