結果
| 問題 |
No.65 回数の期待値の練習
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-04-05 10:50:28 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 37 ms / 5,000 ms |
| コード長 | 191 bytes |
| コンパイル時間 | 703 ms |
| コンパイル使用メモリ | 82,264 KB |
| 実行使用メモリ | 52,148 KB |
| 最終ジャッジ日時 | 2025-04-05 10:50:31 |
| 合計ジャッジ時間 | 2,342 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge6 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 16 |
ソースコード
K = int(input())
memo = {}
def f(x):
if x>=K:return 0
if x in memo:
return memo[x]
memo[x] = (f(x+1)+f(x+2)+f(x+3)+f(x+4)+f(x+5)+f(x+6))/6+1
return memo[x]
print(f(0))