結果

問題 No.567 コンプリート
ユーザー tktk_snsntktk_snsn
提出日時 2021-01-11 16:29:24
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 358 bytes
コンパイル時間 133 ms
コンパイル使用メモリ 82,240 KB
実行使用メモリ 83,064 KB
最終ジャッジ日時 2024-05-01 06:50:53
合計ジャッジ時間 4,555 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
68,584 KB
testcase_01 AC 38 ms
59,216 KB
testcase_02 AC 41 ms
60,928 KB
testcase_03 AC 43 ms
61,684 KB
testcase_04 AC 37 ms
60,380 KB
testcase_05 AC 38 ms
62,128 KB
testcase_06 AC 39 ms
61,508 KB
testcase_07 AC 40 ms
60,512 KB
testcase_08 AC 41 ms
61,288 KB
testcase_09 AC 52 ms
61,612 KB
testcase_10 AC 39 ms
61,780 KB
testcase_11 AC 33 ms
52,552 KB
testcase_12 AC 38 ms
60,856 KB
testcase_13 AC 38 ms
61,036 KB
testcase_14 AC 39 ms
61,132 KB
testcase_15 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

dp = [0.0] * (1 << 6)
dp[0] = 1.0
for _ in range(n):
    newDP = [0.0] * (1 << 6)
    for S in reversed(range(1 << 6)):
        for i in range(6):
            if (S >> i) & 1:
                newDP[S] += dp[S] / 6.0
            else:
                newDP[S ^ (1 << i)] += dp[S] / 6.0
    dp = newDP

print("{:.15f}".format(dp[(1 << 6)-1]))
0