dxnge

9

Oct 28th, 2021
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. with open('17-4.txt') as f:
  2.     cnt = 0
  3.     while a := f.readline():
  4.         x = int(a)
  5.         if len(list((x, d) for d in (2, 3, 5, 7) if x % d == 0)) == 2:
  6.             cnt += 1
  7. print(cnt)
Advertisement
Add Comment
Please, Sign In to add comment