dxnge

28

Dec 7th, 2021
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. from functools import reduce
  2. x = 500_000_001
  3. cnt = 0
  4. while cnt < 5:
  5.     dls = set()
  6.     for i in range(2, int(x**0.5)+1):
  7.         if x % i == 0:
  8.             dls |= {i}
  9.         if len(dls) == 5:
  10.             break
  11.     if len(dls) == 5:
  12.         pr = reduce(lambda x, y: x*y, dls)
  13.         if pr % 100 == 91 and pr <= x:
  14.             cnt += 1
  15.             print(pr, max(dls))
  16.     x += 1
  17.  
Advertisement
Add Comment
Please, Sign In to add comment