結果
| 問題 |
No.639 An Ordinary Sequence
|
| コンテスト | |
| ユーザー |
ntuda
|
| 提出日時 | 2024-12-10 22:35:37 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 48 ms / 1,000 ms |
| コード長 | 152 bytes |
| コンパイル時間 | 464 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 56,704 KB |
| 最終ジャッジ日時 | 2024-12-10 22:35:40 |
| 合計ジャッジ時間 | 2,468 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 17 |
ソースコード
from functools import lru_cache
@lru_cache(maxsize=1000)
def f(x):
if x == 0:
return 1
return f(x//3) + f(x//5)
print(f(int(input())))
ntuda