結果

問題 No.639 An Ordinary Sequence
ユーザー wajima_wataru
提出日時 2018-03-03 16:30:17
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 32 ms / 1,000 ms
コード長 173 bytes
コンパイル時間 314 ms
コンパイル使用メモリ 12,288 KB
実行使用メモリ 10,368 KB
最終ジャッジ日時 2025-01-02 02:23:17
合計ジャッジ時間 1,850 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

a = {0: 1}


def get(i):
    if i not in a:
        n = get(i // 3) + get(i // 5) 
        a[i] = n
        return n
    else:
        return a[i]

print(get(int(input())))
0