Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- import math
- # Auto-generated code below aims at helping you parse
- # the standard input according to the problem statement.
- x = []
- ans = ""
- n = int(input())
- for i in range(n):
- t = input()
- x.append(t)
- # Write an action using print
- print("Debug messages...",t, file=sys.stderr)
- if n > 1:
- for j in range(n):
- if int(x[j][:1]) == 0 or int(x[j-1][:1]) == 0:
- if int(x[j][:2]) > int(x[j-1][:2]):
- ans = x[j-1]
- print(ans)
- else:
- print(x[0])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement