Advertisement
DaniDori

(№ 4322) (А. Кабанов)

Nov 29th, 2023
642
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. f = open("in.txt", "r")
  2. mi = 100001
  3. ma = -1
  4. cnt = 0
  5. while 1:
  6.     s = f.readline()[:-1]
  7.     if not s:
  8.         break
  9.     s = int(s)
  10.     if (s % 10 == 5 or s % 10 == 7) and s % 9 != 0 and s % 11 != 0:
  11.         cnt += 1
  12.         ma = max(s, ma)
  13.         mi = min(s, mi)
  14. print(cnt, mi + ma)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement