Farz0l1x

Untitled

Dec 2nd, 2023
768
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. def f(n):
  2.     s = ""
  3.     while n > 0:
  4.         s += str(n % 17)
  5.         n //= 17
  6.     s = s[::-1]
  7.     return s
  8. count = 0
  9. for n in range(17**6, 17**7):
  10.     n = f(n)
  11.     if '2' not in n and '3' not in n and '5' not in n and '7' not in n and len(n) == len(set(n)) and int(n[:1]) % 2 == 1:
  12.         count += 1
  13. print(count)
Advertisement
Add Comment
Please, Sign In to add comment