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

2643
2302
2168
3234
2708
2199
2895
3016
2323
2581
2550
2391
2378
2605
3099
3049
1102
3031
2569
3141
2807
2647
1563
2744
2609
2722
1796
2977
2382
2593
3387
2421
3256
2161
2674
2713
2536
2539
2626
2809
2201
3211
1801
3161
2134
2705
2124
2900
2584
2889
3251
2804
2436
2579
1276
2585
2537
2375
1479
2928
2717
2281
1653
2323
2749
1107
2744
1131
2345
2605
2561
2470
1315
3317
2392
2566
3227
2864
2391
3225
2557
2740
3236
2248
2622
2498
2714
3037
2148
2657
3408
2312
3453
3407
2763
2670
2313
2433
2334
2930
2725
2028
3553
3213
2521
3006
2446
2136
2380
2423
2844
2679
2468
3132
3230
2636
3135
2268
2489
2643
2344
3275
1389
2253
3275
2278
2844
3101
3470
1142
2528
2617
3043
2698
2559
2136
2583
2348
2705
2333
2654
3111
3176
3264
2191
1185
3387
2167
2528
2203
2644
3307
2521
2513
1339
2680
2522
2279
2424
2525
2680
3173
1095
1273
3011
2356
2511
2302
2809
2319
3125
2398
3207
1565
2377
3394
2779
2929
1339
2439
2863
1708
3505
3031
2565
2323
2321
2032
2321
2748
3213
2443
2296
2637
2482
2624
2300
3591
1292
2039
2051
2854
2188
2528
2445

JOJ Answer

-12
-149
874
-184
830
910
810
921
-80
824
845
837
1334
-176
922
999
1004
1720
916
1515
927
995
855
1183
-61
-93
790
-104
848
911
783
1208
891
991
-17
846
-143
781
-65
-164
840
-174
-116
802
1054
790
-45
826
824
828
1079
872
-22
949
-40
-76
872
794
982
842
772
-14
792
-27
-91
-16
-171
-82
872
938
-42
1114
-10
1906
837
788
-151
-26
917
-58
859
892
905
796
-34
871
-185
771
848
-171
816
993
997
-35
-129
-226
-162
1216
994
-142
884
871
804
963
841
820
-114
904
-27
-97
843
889
-34
1065
784
819
-35
989
1156
922
-136
928
922
831
789
925
-165
-151
-180
859
-13
887
858
907
936
933
916
834
868
-122
-13
-75
-98
899
-69
813
-11
818
781
804
843
-45
-7
791
-42
-15
786
817
-26
1086
-170
817
1095
-164
888
791
883
784
-164
811
-106
987
876
1001
892
-25
-20
930
-21
956
917
808
933
-28
-20
-60
792
902
-20
-41
860
-82
926
1054
865
-34
-152
-9
-33
865
-35
835
872
851
821
959
-200
-99
908
-163
1089
959
815
854
1005
-49
880
-100
835
-38
-93
-109
1149
802
796
941
-143
779
928
828
816
-151
-68
917
778
-174
894
-94
895
780
780
-59
885