My issue
t=int(input())
for i in range (t):
(A,B,C,D,E)=map(int,input().split())
c=0
if (A+B or B+C or C+A)<=D:
c=c+1
if (A or B or C)<=E and (c==1) :
print(“YES”)
else:
print(“NO”)
why this code is not working for this problem?
My code
# cook your dish here
t=int(input())
for i in range (t):
(A,B,C,D,E)=map(int,input().split())
c=0
if (A+B or B+C or C+A)<=D:
c=c+1
if (A or B or C)<=E and (c==1) :
print("YES")
else:
print("NO")
Problem Link: Airline Restrictions Practice Coding Problem - CodeChef