Advertisement
Guest User

Untitled

a guest
Feb 27th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.51 KB | None | 0 0
  1. import sys
  2. import math
  3. # Auto-generated code below aims at helping you parse
  4. # the standard input according to the problem statement.
  5. x = []
  6. ans = ""
  7. n = int(input())
  8. for i in range(n):
  9.     t = input()
  10.     x.append(t)
  11. # Write an action using print
  12.     print("Debug messages...",t, file=sys.stderr)
  13. if n > 1:
  14.     for j in range(n):
  15.         if int(x[j][:1]) == 0 or int(x[j-1][:1]) == 0:
  16.             if int(x[j][:2]) > int(x[j-1][:2]):
  17.                 ans = x[j-1]
  18.     print(ans)
  19. else:
  20.     print(x[0])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement