It’s a simple and straightforward problem but i’m ending getting runtime error-nzec. Please tell me wherre am i making a mistake and suggestions to sort this out.(I’ve spent a lot of time but couldn’t figure out the mistake) Thanks in Advance!
t=int(input())
res=[]
for j in range(t):
x,y,k,n=map(int,input().split())
if(x<=y):
res.append("LuckyChef")
else:
res.append("UnluckyChef")
for _ in range(n):
p,c=map(int, input().split())
if c<=k:
if p>=x-y:
res[j]='LuckyChef'
break
for x in res:
print(x)