結果
| 問題 | No.639 An Ordinary Sequence |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-01-27 10:05:50 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 81 ms / 1,000 ms |
| コード長 | 151 bytes |
| 記録 | |
| コンパイル時間 | 144 ms |
| コンパイル使用メモリ | 77,244 KB |
| 最終ジャッジ日時 | 2025-12-04 00:54:47 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 17 |
ソースコード
#yuki639
memo={}
def f(x):
if x==0:
return 1
if x in memo:
return memo[x]
memo[x]=f(x/3)+f(x/5)
return memo[x]
n=int(raw_input())
print f(n)