結果

問題 No.287 場合の数
ユーザー tookunn_1213tookunn_1213
提出日時 2016-09-11 17:04:01
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 206 ms / 5,000 ms
コード長 199 bytes
コンパイル時間 75 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-04-28 12:08:48
合計ジャッジ時間 4,005 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 159 ms
10,880 KB
testcase_01 AC 27 ms
10,752 KB
testcase_02 AC 28 ms
10,752 KB
testcase_03 AC 204 ms
11,008 KB
testcase_04 AC 204 ms
10,752 KB
testcase_05 AC 150 ms
10,752 KB
testcase_06 AC 34 ms
10,624 KB
testcase_07 AC 79 ms
10,752 KB
testcase_08 AC 118 ms
10,752 KB
testcase_09 AC 157 ms
11,008 KB
testcase_10 AC 206 ms
10,880 KB
testcase_11 AC 69 ms
10,624 KB
testcase_12 AC 184 ms
10,880 KB
testcase_13 AC 45 ms
10,624 KB
testcase_14 AC 89 ms
10,624 KB
testcase_15 AC 150 ms
10,880 KB
testcase_16 AC 95 ms
10,752 KB
testcase_17 AC 177 ms
10,880 KB
testcase_18 AC 77 ms
10,752 KB
testcase_19 AC 170 ms
10,752 KB
testcase_20 AC 106 ms
10,624 KB
testcase_21 AC 153 ms
10,752 KB
testcase_22 AC 153 ms
11,008 KB
testcase_23 AC 131 ms
11,008 KB
testcase_24 AC 96 ms
10,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
dp=[[0 for j in range(701)]for i in range(10)]
dp[0][0]=1
for i in range(9):
	for j in range(N*6+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