SPOJ Problem

Problem statement: SPOJ.com - Problem ARITH
Solution Link: yNg2c7 - Online Python3 Interpreter & Debugging Tool - Ideone.com
Okay, so the test case that is not working is 100000000000000000-1.(idk why)
Can anyone explain please?
And are there any more test cases where my code fails?
(PS: yeah it’s really brute forced) :sneezing_face: