Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = open('input.txt', 'r')
- b = open('output.txt', 'w')
- mx = -(10 ** 9)
- mn = 10 ** 9
- for x in a:
- x = int(x)
- if x % 2 == 0 and x > 0:
- if x > mx:
- mx = x
- if x < mn:
- mn = x
- if mx != -(10 ** 9) and mn != 10 ** 9:
- print(mn, mx, file=b)
- else:
- print(0, file=b)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement