Record Case Detail

Notes

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

Stderr

106 7137
0 1 3005
0 2 4347
0 4 3454
0 5 1241
0 6 4174
0 7 898
0 9 4508
0 11 4659
0 16 7202
0 17 2135
0 19 189
0 20 1787
0 21 2122
0 23 8379
0 24 2507
0 25 4170
0 26 3756
0 27 8977
0 28 947
0 30 123
0 31 555
0 33 1931
0 35 2829
0 36 3750
0 37 251
0 39 8284
0 40 1660
0 41 1236
0 43 4088
0 45 6277
0 48 4081
0 49 3486
0 50 6523
0 51 2818
0 52 1214
0 53 5747
0 54 6569
0 55 3901
0 57 1537
0 58 2247
0 60 657
0 62 2230
0 63 7227
0 65 3709
0 66 9021
0 67 9557
0 68 1295
0 69 1372
0 70 5671
0 72 7440
0 74 6199
0 77 1974
0 78 6285
0 79 251
0 80 8637
0 81 7520
0 82 5022
0 83 91
0 84 2076
0 85 6317
0 87 8970
0 88 2896
0 91 5917
0 92 9024
0 93 5294
0 95 1632
0 97 3830
0 98 4090
0 99 4961
0 100 6870
0 101 6941
0 102 3889
0 103 4767
0 105 5454
1 0 498
1 3 6438
1 6 2421
1 8 6017
1 10 3374
1 11 6845
1 12 7904
1 13 4393
1 14 7447
1 15 6073
1 16 9455
1 21 1154
1 24 2019
1 25 3543
1 27 5372
1 29 3196
1 30 5291
1 31 53
1 33 2715
1 34 5687
1 35 3289
1 36 7067
1 37 1890
1 40 3844
1 41 9221
1 46 224
1 48 402
1 53 5363
1 54 500
1 55 80

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

1661
774
723
747
2016
833
365
722
805
155
831
705
1277
1227
764
514
882
1465
1045
1786
441
1664
753
1587
535
836
964
714
946
695
1510
629
1441
1486
833
589
824
838
864
727
955
249
414
1215
800
691
475
774
1587
703
687
353
1949
1051
663
1171
911
813
1138
655
718
684
951
619
829
386
433
644
972
320
762
360
943
1009
539
1208
1245
1216
850
1551
361
1485
1123
297
659
432
775
739
603
935
1494
720
868
477
566
609
448
1446
400
1369
647
689
651
821
1058
678
439
693
668
886
964
654
681
786
776
588
1092
716
749
696
524
914
492
1378
969
700
477
807
774
459
673
695
737
1503
857
1078
742
457
662
762
1099
1347
1119
1045
764
614
255
805
862
824
479
402
674
1149
604
726
1016
719
996
1058
1040
831
217
797
931
869
394
1239
874
1244
689
498
527
1440
314
766
1134
817
768

JOJ Answer

1289
774
723
747
1007
652
365
722
805
155
831
544
706
361
764
514
882
1046
1045
885
441
1419
753
913
535
638
806
685
946
695
1257
629
1441
1400
833
589
824
612
864
727
955
249
414
824
800
691
475
774
913
638
687
353
940
1051
663
1171
670
813
345
655
718
271
951
619
745
386
433
644
759
320
762
360
710
1009
539
860
637
1216
603
1493
361
1485
998
297
659
432
775
739
603
935
1494
720
591
477
566
609
448
907
400
574
647
689
651
821
1058
678
439
693
668
748
825
437
617
705
776
588
1092
716
749
639
524
914
492
1200
849
700
477
650
774
459
673
695
621
788
857
757
742
457
662
762
1099
733
692
989
758
614
255
654
855
824
479
402
674
966
440
726
1016
367
519
1058
640
576
217
797
931
869
394
625
611
1169
427
498
527
874
314
646
749
817
768