Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- f = open("in.txt", "r")
- mi = 100001
- ma = -1
- cnt = 0
- while 1:
- s = f.readline()[:-1]
- if not s:
- break
- s = int(s)
- if (s % 10 == 5 or s % 10 == 7) and s % 9 != 0 and s % 11 != 0:
- cnt += 1
- ma = max(s, ma)
- mi = min(s, mi)
- print(cnt, mi + ma)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement