Farz0l1x

Untitled

Dec 7th, 2023
613
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. def f(n):
  2.     s = ""
  3.     while n > 0:
  4.         s += str(n % 9)
  5.         n //= 9
  6.     s = s[::-1]
  7.     return s
  8. count = 0
  9. for x in range(9**4, 9**5):
  10.     s = f(x)
  11.     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:
  12.         count += 1
  13. print(count)
Advertisement
Add Comment
Please, Sign In to add comment