Help me in solving DIFFSUM problem

My issue

I’m actually getting an runtime error even though code is correct

My code

# cook your dish here
n1,n2=map(int,(input().split()))

if n1>n2:
    print(n1-n2)
else:
    print(n1+n2)

Problem Link: DIFFSUM Problem - CodeChef

@pavansaiduvvur
There is something problem with taking inputs in one line.
Cozz this code is working absolutely fine.

# cook your dish here
a = int(input())
b = int(input())
if a > b:
    print( a - b )
else:
    print( a + b )
1 Like

thanks bro