結果

問題 No.639 An Ordinary Sequence
ユーザー 👑 KazunKazun
提出日時 2020-10-15 19:12:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 66 ms / 1,000 ms
コード長 137 bytes
コンパイル時間 627 ms
コンパイル使用メモリ 86,936 KB
実行使用メモリ 71,632 KB
最終ジャッジ日時 2023-09-28 01:16:00
合計ジャッジ時間 3,040 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
71,204 KB
testcase_01 AC 66 ms
71,288 KB
testcase_02 AC 64 ms
71,368 KB
testcase_03 AC 65 ms
71,372 KB
testcase_04 AC 64 ms
71,500 KB
testcase_05 AC 63 ms
71,516 KB
testcase_06 AC 64 ms
71,444 KB
testcase_07 AC 63 ms
71,632 KB
testcase_08 AC 64 ms
71,288 KB
testcase_09 AC 63 ms
71,520 KB
testcase_10 AC 63 ms
71,248 KB
testcase_11 AC 64 ms
71,076 KB
testcase_12 AC 65 ms
71,516 KB
testcase_13 AC 66 ms
71,432 KB
testcase_14 AC 64 ms
71,260 KB
testcase_15 AC 63 ms
71,452 KB
testcase_16 AC 64 ms
71,296 KB
testcase_17 AC 61 ms
71,544 KB
testcase_18 AC 62 ms
71,500 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def f(N):
    if N in Memo:
        return Memo[N]

    Memo[N]=f(N//3)+f(N//5)
    return Memo[N]

N=int(input())
Memo={0:1}
print(f(N))
0