I'm trying to solve this problem in csacademy. I solved it in C++ but translating the same code in python 3 gets "Non zero exit code = 1" verdict. What does it mean? I have experienced this verdict first time & got no explanation anywhere C++_code: Python_3_code:
upd: got it. it was caused due to "by default recursion limit in python". so a simple line "sys.setrecursionlimit(100000)" solve the problem.