The Lead Game of easy problems.

when I test my code using the example given in the question, I get the same output. But I get wrong answer when I submit it.

n = int(raw_input())

i = 0

diff = 0

for i in range(n):

p1,p2 = map(int,raw_input().split())

if abs(p1-p2) > diff:

	if p1>p2:

		diff = p1 - p2
		winner = 1
		diff = p2 - p1
		winner = 2

print str(winner)+""+ str(diff )

3 things I must point out :

  1. If you wrote the code as the same you wrote here you might be getting the indentation error after the for loop .Thant's not a big deal .. i know you can fix it
  2. The last line of the print statement need a space b/w "" ..That's also not a great job to do
  3. Last and most important .... you need to calculate the lead not the max difference of the score hit by the team in the current match...Read the question carefully

If you have any doubts do prompt me