結果

問題 No.287 場合の数
ユーザー titiatitia
提出日時 2022-10-08 02:52:09
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 168 ms / 5,000 ms
コード長 218 bytes
コンパイル時間 120 ms
コンパイル使用メモリ 10,516 KB
実行使用メモリ 7,924 KB
最終ジャッジ日時 2023-09-03 21:14:37
合計ジャッジ時間 4,664 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
7,820 KB
testcase_01 AC 16 ms
7,692 KB
testcase_02 AC 17 ms
7,800 KB
testcase_03 AC 166 ms
7,884 KB
testcase_04 AC 168 ms
7,760 KB
testcase_05 AC 123 ms
7,756 KB
testcase_06 AC 23 ms
7,864 KB
testcase_07 AC 63 ms
7,816 KB
testcase_08 AC 97 ms
7,920 KB
testcase_09 AC 135 ms
7,692 KB
testcase_10 AC 165 ms
7,780 KB
testcase_11 AC 50 ms
7,764 KB
testcase_12 AC 145 ms
7,816 KB
testcase_13 AC 33 ms
7,924 KB
testcase_14 AC 69 ms
7,732 KB
testcase_15 AC 127 ms
7,820 KB
testcase_16 AC 73 ms
7,776 KB
testcase_17 AC 141 ms
7,880 KB
testcase_18 AC 61 ms
7,776 KB
testcase_19 AC 132 ms
7,768 KB
testcase_20 AC 80 ms
7,864 KB
testcase_21 AC 123 ms
7,696 KB
testcase_22 AC 123 ms
7,776 KB
testcase_23 AC 106 ms
7,828 KB
testcase_24 AC 70 ms
7,696 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())

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

print(DP[6*n])
0