結果

問題 No.567 コンプリート
ユーザー ああいいああいい
提出日時 2022-01-28 11:47:13
言語 PyPy3
(7.3.15)
結果
MLE  
実行時間 -
コード長 289 bytes
コンパイル時間 296 ms
コンパイル使用メモリ 86,948 KB
実行使用メモリ 731,348 KB
最終ジャッジ日時 2023-08-27 22:52:56
合計ジャッジ時間 5,485 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
75,968 KB
testcase_01 AC 76 ms
75,800 KB
testcase_02 AC 83 ms
76,544 KB
testcase_03 AC 80 ms
76,556 KB
testcase_04 AC 79 ms
76,688 KB
testcase_05 AC 76 ms
76,508 KB
testcase_06 AC 78 ms
76,596 KB
testcase_07 AC 72 ms
76,048 KB
testcase_08 AC 78 ms
76,552 KB
testcase_09 AC 77 ms
76,692 KB
testcase_10 AC 76 ms
76,552 KB
testcase_11 AC 69 ms
71,060 KB
testcase_12 AC 75 ms
76,044 KB
testcase_13 AC 75 ms
75,836 KB
testcase_14 AC 77 ms
76,580 KB
testcase_15 MLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
dp = [[0] * (1 << 6) for _ in range(n)]
p = 1 / 6
for i in range(6):
    dp[0][1 << i] = p
for i in range(n-1):
    for bit in range(1 << 6):
        for j in range(6):
            mask = 1 << j
            dp[i+1][bit | mask] += dp[i][bit] * p
print(dp[-1][(1 << 6) - 1])
0