結果

問題 No.287 場合の数
ユーザー brthyyjpbrthyyjp
提出日時 2021-12-11 00:53:46
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 92 ms / 5,000 ms
コード長 229 bytes
コンパイル時間 517 ms
コンパイル使用メモリ 87,188 KB
実行使用メモリ 76,448 KB
最終ジャッジ日時 2023-09-26 04:14:20
合計ジャッジ時間 4,012 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
76,012 KB
testcase_01 AC 74 ms
71,288 KB
testcase_02 AC 84 ms
76,332 KB
testcase_03 AC 88 ms
76,356 KB
testcase_04 AC 88 ms
76,432 KB
testcase_05 AC 89 ms
76,008 KB
testcase_06 AC 85 ms
76,224 KB
testcase_07 AC 85 ms
76,268 KB
testcase_08 AC 88 ms
76,072 KB
testcase_09 AC 87 ms
76,424 KB
testcase_10 AC 92 ms
76,228 KB
testcase_11 AC 86 ms
76,428 KB
testcase_12 AC 89 ms
76,372 KB
testcase_13 AC 85 ms
76,064 KB
testcase_14 AC 88 ms
76,260 KB
testcase_15 AC 88 ms
76,368 KB
testcase_16 AC 86 ms
76,240 KB
testcase_17 AC 88 ms
76,260 KB
testcase_18 AC 85 ms
76,316 KB
testcase_19 AC 89 ms
76,372 KB
testcase_20 AC 91 ms
76,236 KB
testcase_21 AC 89 ms
76,232 KB
testcase_22 AC 88 ms
76,368 KB
testcase_23 AC 88 ms
76,448 KB
testcase_24 AC 86 ms
76,236 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

dp = [[0]*(6*n+1) for i in range(9)]
dp[0][0] = 1
for i in range(8):
    for j in range(6*n+1):
        for k in range(n+1):
            if j+k <= 6*n:
                dp[i+1][j+k] += dp[i][j]
print(dp[8][6*n])
0