Notes
This function is in beta test. Please help improve it in the issues
here.
Hints
Your answer may be identical to the JOJ answer in the first several lines.
However, the main problem you meet now is Memory Exceeded. And the exit code of your program is -9, which should be 0.
Please double check your code to solve this problem and try again.
Your Answer
JOJ Answer
1433298013 1071482798 1252778652 1431475588 1116010004 1110914757 1341909639 1394846985 1020683255 1496976301 1053249057 786 1018631143 56 1107866221 1486682701 1388787028 1150407382 178 1132583684 1256864115 1128108451 997 1170218385 1481971348 1126643865 1368065802 1180989823 1481943217 39 1186323960 1488900847 1133584871 1041520785 1214770847 1027134869 271 491 1123642662 865 1440568442 1235851190 1033233797 1084545301 1414235291 1313800493 1005437486 1354764936 1226327773 1181521177 1116970540 1331415768 1048956733 460 1179880582 1028967973 1366308080 1402210559 1360322365 1279244901 888 1450417819 1459436295 1111718829 971 1442583985 818 1029632577 1325613627 888 1494011065 1253135190 1383432167 1364822376 1056169610 1253116344 1120003810 1108071154 1140146460 1135608358 1280107132 531 1204576781 1177696891 1180070760 1170943348 204 1239556035 1010428724 46 1243210317 446 1185917702 1338102463 1115437142 273 1029696831 491 1214950643 1386812113 1199337176 1253623096 432 1000613783 1210150553 1171438447 7