dxnge

tsk 3

Nov 8th, 2021
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. x = 500_001
  2. cnt = 0
  3. while cnt < 10:
  4.     ds = set()
  5.     for d in range(2, int(x * 0.5) + 1):
  6.         if x % d == 0:
  7.             ds |= {d, x // d}
  8.     sds = sorted(ds)
  9.     for i in sds:
  10.         if i % 10 == 8 and i not in (8, x):
  11.             print(x, i)
  12.             cnt += 1
  13.             break
  14.     x += 1
  15.  
Advertisement
Add Comment
Please, Sign In to add comment