Can anyone help me with this problem. My output matches the one in the question when I run the program in Pycharm but I get WA on submitting here.Here is my code:
list=[]
def compute(m,n):
if (m-n)==2:
if m%2==0:
a=m+n
list.append(a)
elif m%2!=0:
a=m+n-1
list.append(a)
elif m==n:
if m%2==0:
a=m+n
list.append(a)
elif m%2!=0:
a=m+n-1
list.append(a)
for i in range(int(input())):
x,y=map(int,input().split())
if x>=y:
compute(x,y)
else:
list.append(‘0’)
for i in range(len(list)):
if list[i]==‘0’:
print(“No Number”)
else:
print(list[i])