結果

問題 No.567 コンプリート
ユーザー ntudantuda
提出日時 2022-10-31 20:38:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 641 ms / 2,000 ms
コード長 194 bytes
コンパイル時間 1,471 ms
コンパイル使用メモリ 86,436 KB
実行使用メモリ 77,000 KB
最終ジャッジ日時 2023-09-22 17:10:48
合計ジャッジ時間 3,173 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,124 KB
testcase_01 AC 72 ms
70,908 KB
testcase_02 AC 71 ms
71,176 KB
testcase_03 AC 72 ms
70,996 KB
testcase_04 AC 73 ms
71,216 KB
testcase_05 AC 75 ms
70,952 KB
testcase_06 AC 74 ms
70,852 KB
testcase_07 AC 73 ms
71,196 KB
testcase_08 AC 72 ms
71,160 KB
testcase_09 AC 73 ms
71,160 KB
testcase_10 AC 74 ms
71,092 KB
testcase_11 AC 71 ms
71,132 KB
testcase_12 AC 72 ms
70,972 KB
testcase_13 AC 77 ms
71,096 KB
testcase_14 AC 77 ms
71,156 KB
testcase_15 AC 641 ms
77,000 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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