Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def f(n):
- s = ""
- while n > 0:
- s += str(n % 9)
- n //= 9
- s = s[::-1]
- return s
- count = 0
- for x in range(9**4, 9**5):
- s = f(x)
- if s.count('3') == 1 and '53' not in s and '35' not in s and '36' not in s and '63' not in s and '73' not in s and '37' not in s and '38' not in s and '83' not in s:
- count += 1
- print(count)
Advertisement
Add Comment
Please, Sign In to add comment