結果

問題 No.65 回数の期待値の練習
ユーザー rlangevinrlangevin
提出日時 2023-01-08 23:07:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 74 ms / 5,000 ms
コード長 149 bytes
コンパイル時間 2,261 ms
コンパイル使用メモリ 86,720 KB
実行使用メモリ 71,512 KB
最終ジャッジ日時 2023-08-22 07:35:15
合計ジャッジ時間 2,960 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,440 KB
testcase_01 AC 68 ms
71,504 KB
testcase_02 AC 70 ms
71,208 KB
testcase_03 AC 70 ms
71,472 KB
testcase_04 AC 68 ms
71,144 KB
testcase_05 AC 69 ms
71,212 KB
testcase_06 AC 69 ms
71,188 KB
testcase_07 AC 71 ms
71,224 KB
testcase_08 AC 70 ms
71,364 KB
testcase_09 AC 71 ms
71,500 KB
testcase_10 AC 72 ms
71,096 KB
testcase_11 AC 70 ms
71,372 KB
testcase_12 AC 72 ms
71,132 KB
testcase_13 AC 74 ms
71,352 KB
testcase_14 AC 70 ms
71,260 KB
testcase_15 AC 70 ms
71,036 KB
testcase_16 AC 70 ms
71,448 KB
testcase_17 AC 72 ms
71,484 KB
testcase_18 AC 69 ms
71,512 KB
testcase_19 AC 71 ms
71,388 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

K = int(input())
dp = [0] * (K + 7)
for i in range(K - 1, -1, -1):
    dp[i] += 1
    for j in range(1, 7):
        dp[i] += dp[i + j]/6
print(dp[0])
0