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

1522
1301
2121
2249
1413
3345
2214
6952
6423
6206
6718
-9
8072
6020
-7
3149
2033
6625
2597
3926
9389
8731
6479
3016
4570
-5
1648
7505
2574
6195
10276
2099
8865
2361
2248
6947
956
4510
1021
1075
1073
1035
9493
1045
8050
1326
1794
1569
2454
3764
1329
1482
1383
1800
9412
2571
5563
-2
1337
1082
5141
1869
3344
1287
6831
3524
1560
1235
-2
3673
3948
7639
1987
5482
-5
6222
2589
988
8760
1896
5330
1029
2076
3930
9501
-3
3895
4083
1802
8724
2978
6669
1398
1697
2095
1782
5043
1343
4164
1145
2734
7649
2886
6195
4633
7410
986
1756
-7
9616
10378
6019
3410
-6
6919
1542
5798
2031
5426
8582
2449
-8
4505
5874
6517
1610
5739
5254
-3
5833
5676
1577
3200
1231
1285
1311
1791
2279
-3
1942
6668
4452
-9
6680
4617
8277
5951
3195
7019
8515
2573
1091
1847
INF
1057
6392
1303
8867
2198
1426
2271
-8
6967
4786
1271
4612
-7
1537
10047
1073
3729
7518
1245
2838
1824
1103
1074
7177
1113
-7
2541
1530
1286
1092
1764
7652
5789
6116
8184
1339
4958
3495
6753
2290
4713
9825
7614
2808
1220
5079
4558
10029
1115
7082
8747
1702
9826
9696
-1
2351
2610
646

JOJ Answer

-117
784
-23
-177
798
-121
-46
749
811
824
833
-9
772
1094
-88
839
-80
863
-142
-209
-143
-31
-33
875
-81
-214
-19
843
-19
842
779
925
1358
904
-16
-54
765
803
-49
839
1073
-93
847
956
-18
-129
-56
-45
-102
852
-58
-95
-11
928
2009
913
927
-42
-140
825
934
897
763
-92
-66
858
750
966
-13
818
-38
801
912
896
-104
821
807
-57
750
843
-19
-100
-70
848
-73
-10
-57
796
813
761
871
-54
800
801
-16
783
925
-129
821
-43
-81
916
-18
897
1024
919
-13
-28
-160
1003
986
756
808
-65
898
1542
959
-45
750
946
-27
-53
840
884
-66
889
-22
-71
-60
-38
852
837
912
833
-136
-38
-99
-78
-89
-153
972
-78
-64
923
-102
814
837
776
895
-18
763
-95
-19
886
766
773
-97
993
-128
804
794
-65
-112
836
-170
803
-215
811
950
-139
776
-88
798
1246
804
-96
788
795
-85
-198
-78
823
-164
1092
-103
805
984
989
-128
749
-31
756
782
864
-65
750
910
909
859
-114
1011
-76
796
936
923
-91
-43
862
-12
806
-78
780
969
837
824
786
916
924
-79
769
1170
856
1071
-49
-37
873
827
-43
1942
-120
932
-161
980
-72
854
796
-172
-14
852
-83
1476
-100
831
922
-25