結果

問題 No.65 回数の期待値の練習
ユーザー Tomoyarn
提出日時 2023-01-15 19:10:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 40 ms / 5,000 ms
コード長 167 bytes
コンパイル時間 359 ms
コンパイル使用メモリ 82,404 KB
実行使用メモリ 53,360 KB
最終ジャッジ日時 2024-12-29 10:03:48
合計ジャッジ時間 2,137 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

K = int(input())

dp = [0] * 6

for i in range(K):
    x = 0
    for j in range(1, 7):
        x += dp[-j] * (1 / 6)
    x += 1
    dp.append(x)

print(dp[-1])        
0