結果

問題 No.567 コンプリート
ユーザー kokoa1046kokoa1046
提出日時 2017-10-07 01:41:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 971 ms / 2,000 ms
コード長 267 bytes
コンパイル時間 351 ms
コンパイル使用メモリ 87,348 KB
実行使用メモリ 291,736 KB
最終ジャッジ日時 2023-08-21 06:39:36
合計ジャッジ時間 3,432 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,308 KB
testcase_01 AC 71 ms
71,260 KB
testcase_02 AC 67 ms
71,188 KB
testcase_03 AC 71 ms
71,396 KB
testcase_04 AC 69 ms
71,180 KB
testcase_05 AC 68 ms
71,328 KB
testcase_06 AC 67 ms
71,260 KB
testcase_07 AC 67 ms
71,408 KB
testcase_08 AC 67 ms
71,528 KB
testcase_09 AC 69 ms
71,456 KB
testcase_10 AC 69 ms
71,608 KB
testcase_11 AC 66 ms
71,240 KB
testcase_12 AC 69 ms
71,364 KB
testcase_13 AC 68 ms
71,388 KB
testcase_14 AC 69 ms
71,324 KB
testcase_15 AC 971 ms
291,736 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def twoDimArray(row,column,n): return [[n for j in range(column)] for i in range(row)]
n=int(input())
dp=twoDimArray(n,7,0)
dp[0][1]=1.0
for i in range(1,n):
    for j in range(1,7):
        dp[i][j]=j/6*dp[i-1][j]+(1-(j-1)/6)*dp[i-1][j-1]
print(dp[n-1][6])
    
    
0