NZEC runtime error in python 3

could someone please tell me, WHY MY PROGRAM SHOWS A NZEC RUNTIME ERROR EVEN THOUGH IT WORKS WELL IN
SUBLIME TEXT 3?

Here is my code…

var= int(input())
second_var= int(input())
result= var- second_var
x=result
rev=0
while x >0:
    y=x%10
    x//=10
    if(rev==0):
        rev= rev*10+ (y+1)
    else:
        rev= rev*10 + y
x=rev
rev=0
while x>0:
    rev= rev*10 + (x%10)
    x//=10
print(rev)