結果

問題 No.65 回数の期待値の練習
ユーザー ytftytft
提出日時 2022-11-07 06:12:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 68 ms / 5,000 ms
コード長 159 bytes
コンパイル時間 258 ms
コンパイル使用メモリ 86,996 KB
実行使用メモリ 71,288 KB
最終ジャッジ日時 2023-09-27 21:01:04
合計ジャッジ時間 2,933 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
71,232 KB
testcase_01 AC 68 ms
71,112 KB
testcase_02 AC 68 ms
71,212 KB
testcase_03 AC 66 ms
71,256 KB
testcase_04 AC 68 ms
71,132 KB
testcase_05 AC 67 ms
70,780 KB
testcase_06 AC 68 ms
71,052 KB
testcase_07 AC 67 ms
71,044 KB
testcase_08 AC 66 ms
71,104 KB
testcase_09 AC 68 ms
71,200 KB
testcase_10 AC 68 ms
71,200 KB
testcase_11 AC 67 ms
71,256 KB
testcase_12 AC 68 ms
71,276 KB
testcase_13 AC 68 ms
71,020 KB
testcase_14 AC 66 ms
71,136 KB
testcase_15 AC 64 ms
71,212 KB
testcase_16 AC 66 ms
71,212 KB
testcase_17 AC 68 ms
71,288 KB
testcase_18 AC 67 ms
71,224 KB
testcase_19 AC 66 ms
71,052 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=lambda:sys.stdin.readline().rstrip()
K=int(input())
dp=[0 for i in range(K+6)]
for i in range(6,K+6):
	dp[i]=sum(dp[i-6:i])/6+1
print(dp[K+5])
0