Farz0l1x

Untitled

Mar 5th, 2024
708
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. def f(n):
  2.     s = ''
  3.     while n > 0:
  4.         s += str(n % 5)
  5.         n //= 5
  6.     s = s[::-1]
  7.     return s
  8. n = 5**2004 - 5**1016 - 25**508 - 5**400 + 25**250 - 27
  9. b = f(n)
  10. print(b.count('4'))
Advertisement
Add Comment
Please, Sign In to add comment