Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def produit_chiffres(N):
- N=str(N)
- L=len(N)
- produit=1
- for i in range(L):
- x=int(N[i])
- produit*=x
- N=str(produit)
- compteur=1
- while len(N)>1:
- N=str(N)
- L=len(N)
- produit=1
- for i in range(L):
- x=int(N[i])
- produit*=x
- N=str(produit)
- compteur+=1
- return compteur,N
- N=277777788888899
- for i in range(100):
- N+=1
- etapes=produit_chiffres(N)[0]
- valeur_finale=produit_chiffres(N)[1]
- print(etapes,N)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement