結果

問題 No.567 コンプリート
ユーザー H3PO4H3PO4
提出日時 2020-10-03 08:37:37
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 214 bytes
コンパイル時間 163 ms
コンパイル使用メモリ 10,676 KB
実行使用メモリ 33,920 KB
最終ジャッジ日時 2023-09-25 04:50:56
合計ジャッジ時間 8,617 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 132 ms
29,752 KB
testcase_01 AC 128 ms
29,524 KB
testcase_02 AC 129 ms
29,632 KB
testcase_03 AC 130 ms
29,664 KB
testcase_04 AC 129 ms
29,552 KB
testcase_05 AC 131 ms
29,664 KB
testcase_06 AC 130 ms
29,500 KB
testcase_07 AC 131 ms
29,528 KB
testcase_08 AC 132 ms
29,680 KB
testcase_09 AC 129 ms
29,508 KB
testcase_10 AC 130 ms
29,580 KB
testcase_11 AC 128 ms
29,616 KB
testcase_12 AC 130 ms
29,640 KB
testcase_13 AC 130 ms
29,676 KB
testcase_14 AC 127 ms
29,740 KB
testcase_15 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np

N = int(input())
dp = np.zeros(7, dtype=float)
dp[0] = 1.0
for _ in range(N):
    new_dp = dp * np.arange(7) / 6
    new_dp[1:] += dp[:-1] * np.arange(6, 0, -1) / 6
    dp = new_dp
print(dp[6])
0