TheLeadGame in python

The code chef compiler prints wrong answer while i get perfect answer on my computer. can any one tell me the reason.

k = []

e = int(raw_input())
while(e):

a,b = map(int,raw_input().split())
if a > b:
	k.append((a-b,1))
if b > a:
	k.append((b-a,2))
e -= 1

k = sorted(k)

print k[-1][1],k[-1][0]

Looks like you have already solved this question… Please close this question now… :slight_smile: