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