結果

問題 No.287 場合の数
ユーザー WangLiqinWangLiqin
提出日時 2020-06-03 21:58:38
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 129 ms / 5,000 ms
コード長 228 bytes
コンパイル時間 257 ms
コンパイル使用メモリ 10,604 KB
実行使用メモリ 29,728 KB
最終ジャッジ日時 2023-08-17 06:56:11
合計ジャッジ時間 6,848 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
29,628 KB
testcase_01 AC 125 ms
29,552 KB
testcase_02 AC 125 ms
29,680 KB
testcase_03 AC 128 ms
29,536 KB
testcase_04 AC 126 ms
29,708 KB
testcase_05 AC 126 ms
29,464 KB
testcase_06 AC 124 ms
29,680 KB
testcase_07 AC 125 ms
29,568 KB
testcase_08 AC 126 ms
29,516 KB
testcase_09 AC 127 ms
29,544 KB
testcase_10 AC 128 ms
29,472 KB
testcase_11 AC 127 ms
29,500 KB
testcase_12 AC 127 ms
29,720 KB
testcase_13 AC 126 ms
29,720 KB
testcase_14 AC 126 ms
29,688 KB
testcase_15 AC 128 ms
29,656 KB
testcase_16 AC 129 ms
29,700 KB
testcase_17 AC 129 ms
29,640 KB
testcase_18 AC 129 ms
29,576 KB
testcase_19 AC 127 ms
29,720 KB
testcase_20 AC 124 ms
29,728 KB
testcase_21 AC 124 ms
29,668 KB
testcase_22 AC 123 ms
29,708 KB
testcase_23 AC 128 ms
29,660 KB
testcase_24 AC 125 ms
29,696 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np

N = int(input())
M = 6 * N
dp = np.zeros(M + 1, np.int64)
for i in range(N + 1):
    dp[i] += 1

for _ in range(7):
    prev = dp.copy()
    for i in range(1, N + 1):
        dp[i:] += prev[:-i]
print(dp[M])
0