Skip to content

Instantly share code, notes, and snippets.

@visvirial
Created March 14, 2020 12:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save visvirial/f76dedc140f5fe0537dfd957dda2ddda to your computer and use it in GitHub Desktop.
Save visvirial/f76dedc140f5fe0537dfd957dda2ddda to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
def jizoku(i):
if i < 10:
return 0
a = 1
while i > 0:
a *= i % 10
i /= 10
return jizoku(a) + 1
def jizoku_of(n):
i = 0
while True:
if jizoku(i) == n:
return i
i += 1
print jizoku_of(5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment