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 Time 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
187550908582508 509 187550907104091 187550825720095 187550787036109 187550973033396 187551034443027 107 187550783074515 187550942179667 187550900351954 609 19867602 896 187550994347596 187551148478993 187551093994943 508 187550906889083 364 187550799361349 187551073448831 187551112969953 681 187551109219217 51 857 187550915850721 187550821397636 187551149946097 187550774707033 187551189419390 187551148673220 187550909443591 398 187550823462512 774 969 187551080768425 187551204784435 187551052865859 513 187550765752492 187550924771033 187550854863586 17210379 187550760616189 105 187551150937996 16 187550787176979 187550853160906 187550923678029 187551006509272 187550915328772 187550827099298 424 187551141078508 56 187550819049558 210 838 187550886566904 435 187550937547847 866 665 187551118213553 413 913 187551107791368 187551177161529 187550821620498 775 425 248 187550847039460 187550827303012 187551048973655 187550931959872 700 187550759086903 187550999394889 187550985684561 187550766339889 187550911953268 1
JOJ Answer
1186250486 999998660 1184772069 1103388073 1064704087 1250701374 1312111005 107 1060742493 1219847645 1178019932 999998760 1019865753 999999047 1272015574 1426146971 1371662921 999998659 1184557061 999998515 1077029327 1351116809 1390637931 999998832 1386887195 51 999999008 1193518699 1099065614 1427614075 1052375011 1467087368 1426341198 1187111569 999998549 1101130490 999998925 999999120 1358436403 1482452413 1330533837 999998664 1043420470 1202439011 1132531564 1017208530 1038284167 105 1428605974 16 1064844957 1130828884 1201346007 1284177250 1192996750 1104767276 999998575 1418746486 56 1096717536 210 999998989 1164234882 999998586 1215215825 999999017 999998816 1395881531 999998564 999999064 1385459346 1454829507 1099288476 999998926 999998576 999998399 1124707438 1104970990 1326641633 1209627850 999998851 1036754881 1277062867 1263352539 1044007867 1189621246 1236627700 999998438 1102149627 1421078632 1161897341 999998879 1247759883 1484090889 1264300482 61 1156588426 1007725521 1245995914 1005947576 1