結果

問題 No.567 コンプリート
ユーザー 👑 rin204rin204
提出日時 2022-07-08 09:22:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 439 ms / 2,000 ms
コード長 193 bytes
コンパイル時間 281 ms
コンパイル使用メモリ 87,220 KB
実行使用メモリ 76,984 KB
最終ジャッジ日時 2023-08-27 02:11:02
合計ジャッジ時間 2,973 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,284 KB
testcase_01 AC 70 ms
71,492 KB
testcase_02 AC 70 ms
71,432 KB
testcase_03 AC 69 ms
71,252 KB
testcase_04 AC 67 ms
71,376 KB
testcase_05 AC 69 ms
71,252 KB
testcase_06 AC 68 ms
71,352 KB
testcase_07 AC 68 ms
71,308 KB
testcase_08 AC 68 ms
71,492 KB
testcase_09 AC 67 ms
71,372 KB
testcase_10 AC 68 ms
71,376 KB
testcase_11 AC 66 ms
71,368 KB
testcase_12 AC 67 ms
71,380 KB
testcase_13 AC 68 ms
71,460 KB
testcase_14 AC 67 ms
71,396 KB
testcase_15 AC 439 ms
76,984 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
dp = [1, 0, 0, 0, 0, 0]
for _ in range(n - 1):
    for i in range(5, 0, -1):
        dp[i] *= (i + 1) / 6
        dp[i] += dp[i - 1] * (6 - i) / 6
    dp[0] /= 6
print(dp[-1])
0