Notes
This function is in beta test. Please help improve it in the issues
here.
Traceback (most recent call last): File "challenge.py", line 50, in <module> main() File "challenge.py", line 45, in main check(c, s, t, p, a, w, 0) File "challenge.py", line 33, in check if check(c, s, t - 1, [pi + ai for pi, ai in zip(p, a)], a, w, r): File "challenge.py", line 37, in check check(c, s, t, p, a, w, r + 1) File "challenge.py", line 37, in check check(c, s, t, p, a, w, r + 1) File "challenge.py", line 37, in check check(c, s, t, p, a, w, r + 1) [Previous line repeated 9 more times] File "challenge.py", line 33, in check if check(c, s, t - 1, [pi + ai for pi, ai in zip(p, a)], a, w, r): File "challenge.py", line 37, in check check(c, s, t, p, a, w, r + 1) File "challenge.py", line 37, in check check(c, s, t, p, a, w, r + 1) File "challenge.py", line 37, in check check(c, s, t, p, a, w, r + 1) [Previous line repeated 9 more times] File "challenge.py", line 33, in check if check(c, s, t - 1, [pi + ai for pi, ai in zip(p, a)], a
Hints
Your answer may be identical to the JOJ answer in the first several lines.
However, the main problem you meet now is Runtime Error. And the exit code of your program is 120, which should be 0.
Please double check your code to solve this problem and try again.
Your Answer
[55, 105, 22, 109, 101, 79, 173, 47, 105, 53, 106, 150, 110, 110, 151, 141, 178, 46, 56, 8, 103, 70, 116, 113, 58, 195, 159, 100, 100, 184, 20, 38, 77, 38, 106, 21, 188, 127, 166, 77, 179, 44, 53, 152, 83, 39, 47, 66, 63, 117, 73, 147, 193, 122, 54, 154, 183, 151, 34, 132, 137, 59, 25, 131, 66, 39, 158, 72, 190, 164, 48, 184, 139, 164, 18, 26, 137, 95, 64, 58, 32, 82, 117, 168, 183, 118, 124, 192, 84, 164, 58, 108, 70, 75, 93, 80, 193, 161, 163, 11, 149, 19, 112, 189, 165, 6, 88, 123, 53, 156, 151, 68, 82, 23, 32, 25, 86, 178, 49, 173, 199, 8, 112, 77, 188, 50, 129, 77, 125, 83, 139, 78, 85, 38, 97, 79, 165, 10, 7, 23, 43, 128, 85, 41, 175, 94, 134, 162, 154, 2, 106, 8, 146, 95, 80, 164, 90, 35, 10, 149, 6, 41, 78, 128, 99, 64, 5, 195, 17, 139, 6, 187, 87] [7216597, 2048160, 7514208, 1767579, 9919588, 7437938, 5554877, 4688673, 4744154, 6979100, 5323592, 2596072, 7362246, 3510849, 2616022, 1289470, 6662749, 280129, 2342185, 8506278, 4647450, 7056850, 6980401, 2869940, 9979490, 4022632, 3847806, 5553810, 40401
JOJ Answer
1248