dxnge

38

Dec 4th, 2021
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. with open('17-4.txt') as f:
  2.     nums = []
  3.     while s := f.readline():
  4.         x = int(s)
  5.         if x % 3 == 0 and all(x % d != 0 for d in (7, 17, 19, 27)):
  6.             nums.append(x)
  7. print(len(nums), max(nums))
  8.  
Advertisement
Add Comment
Please, Sign In to add comment