結果
| 問題 | No.639 An Ordinary Sequence |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-06-06 18:29:26 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 93 ms / 1,000 ms |
| コード長 | 136 bytes |
| 記録 | |
| コンパイル時間 | 428 ms |
| コンパイル使用メモリ | 20,824 KB |
| 実行使用メモリ | 15,488 KB |
| 最終ジャッジ日時 | 2026-04-09 12:02:32 |
| 合計ジャッジ時間 | 3,060 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 17 |
ソースコード
from functools import lru_cache
n=int(input())
@lru_cache
def f(x):
if x==0:
return 1
return f(x//3)+f(x//5)
print(f(n))