結果

問題 No.8101 砂嵐
ユーザー もちふわゆるゆる
提出日時 2023-03-31 23:32:14
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 30 ms / 1,000 ms
コード長 321 bytes
コンパイル時間 202 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-09-23 02:34:36
合計ジャッジ時間 3,635 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 62
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys, math
input = lambda: sys.stdin.readline()[:-1]
def MI(): return map(int, input().split())
inf = 10**18
sys.setrecursionlimit(10**7)  # Codeforcesでは350000程度に

def f(x):
    if x < 10: return 0
    res = 1
    while x:
        res *= x%10
        x //= 10
    return 1 + f(res)

print(f(int(input())))
0