Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def f(n):
- s = ""
- while n > 0:
- s += str(n % 17)
- n //= 17
- s = s[::-1]
- return s
- count = 0
- for n in range(17**6, 17**7):
- n = f(n)
- 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:
- count += 1
- print(count)
Advertisement
Add Comment
Please, Sign In to add comment