Farz0l1x

Untitled

Dec 7th, 2023
871
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. def delit(n):
  2.     ans = []
  3.     d = 2
  4.     while d * d <= n:
  5.         if n % d == 0 and d != 9 and str(d)[-1] == '9':
  6.             ans.append(d)
  7.         d_b = n // d
  8.         if d != d_b and d_b != 9 and str(d_b)[-1] == '9':
  9.             ans.append(d_b)
  10.         d += 1
  11.     ans.sort()
  12.     return ans
  13. for i in range(600_000 + 1, 10**9):
  14.     if len(delit(i)) != 0:
  15.         print(i, min(delit(i)))
Advertisement
Add Comment
Please, Sign In to add comment