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

-12
-149
943
-184
1026
1012
859
1091
-80
824
898
950
1964
-176
986
1035
1033
1720
916
1704
957
1781
967
1256
-61
-93
961
-104
987
937
864
1317
891
1025
-17
846
-143
982
-65
-164
1103
-174
-116
1089
1054
1033
-45
917
917
980
1079
1006
-22
949
-40
-76
1018
900
982
851
854
-14
873
-27
-91
-16
-171
-82
982
1129
-42
1137
-10
1906
1047
983
-151
-26
997
-58
980
1178
1371
948
-34
1022
-185
884
999
-171
967
1099
997
-35
-129
-226
-162
1216
994
-142
1080
959
906
1036
948
915
-114
1010
-27
-97
953
1141
-34
1065
975
1045
-35
989
1156
1045
-136
989
922
920
855
1015
-165
-151
-180
951
-13
1005
1032
907
936
966
1047
938
1149
-122
-13
-75
-98
909
-69
1185
-11
991
887
889
843
-45
-7
921
-42
-15
899
917
-26
1086
-170
898
1095
-164
1115
969
973
1009
-164
913
-106
987
1004
1488
1041
-25
-20
993
-21
1029
996
1072
1052
-28
-20
-60
950
1096
-20
-41
918
-82
978
1054
947
-34
-152
-9
-33
931
-35
835
872
970
821
1089
-200
-99
908
-163
1089
959
934
874
1031
-49
1032
-100
835
-38
-93
-109
1149
905
992
1213
-143
855
1061
919
826
-151
-68

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