結果

問題 No.8101 砂嵐
ユーザー harurun
提出日時 2023-03-10 02:30:50
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 30 ms / 1,000 ms
コード長 193 bytes
コンパイル時間 531 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-09-18 14:06:05
合計ジャッジ時間 4,182 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 62
権限があれば一括ダウンロードができます

ソースコード

diff #

def mul(x):
  r=1
  while x>0:
    r*=x%10
    x//=10
  return r

def f(x):
  if x>=10:
    return 1+f(mul(x))
  else:
    return 0

def main():
  n=int(input())
  print(f(n))
  return

main()
0