Submmission problem

plz, can anyone tell me what’s wrong in this code why it’s showing the wrong answer when I am hitting the submission button? I am new to programming but I think my code is right.

This is Distribute Apple problem. Problem Code - DSTAPLS

n=int(input())
for i in range(n):
a=list(map(int,input().split()))
if(a[0]==a[1]):
print(‘YES’)
else:
print(‘NO’)

Sorry, your logic for this isn’t correct :frowning:

Consider:

1
8 4

The N and K are small enough to simulate both the Candidate’s results manually. What do you see?

1
8 4

ans-> NO
it’s showing correct

So: you simulated the runs for the two candidates with N=8 and K=4, and they each ended up with the same number of apples in each box?

There are four boxes. How many apples did Candidate 1 put in box# 1, box# 2, box #3, box #4, respectively? What about Candidate 2?

sorry!! :anguished:
I interpreted the whole wrong. I will try again Sorry and thanks:relieved:

1 Like

Great - good luck! :slight_smile: Post here when you’ve got AC! :slight_smile:

2 Likes