結果
| 問題 | No.65 回数の期待値の練習 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-09-01 16:18:37 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 25 ms / 5,000 ms |
| コード長 | 251 bytes |
| 記録 | |
| コンパイル時間 | 1,915 ms |
| コンパイル使用メモリ | 84,864 KB |
| 実行使用メモリ | 52,352 KB |
| 最終ジャッジ日時 | 2026-05-13 14:28:26 |
| 合計ジャッジ時間 | 2,009 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 16 |
ソースコード
K = int(input())
note = [0] * (K + 1)
def E(x):
if x < 1:
return 0
elif note[x] == 0:
note[x] = (E(x - 1) + E(x - 2) + E(x - 3) + E(x - 4) + E(x - 5) + E(x - 6)) / 6 + 1
return note[x]
print(E(K))