Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with open('17(1).txt') as f:
- cnt, minim = 0, float('inf')
- while a := f.readline():
- x = int(a)
- if x % 3 == x % 5:
- for d in (31, 47, 53):
- if x % d == 0:
- cnt += 1
- if minim > x:
- minim = x
- break
- print(cnt, minim)
Advertisement
Add Comment
Please, Sign In to add comment