結果

問題 No.2188 整数列コイントスゲーム
ユーザー ニックネームニックネーム
提出日時 2023-01-13 22:36:24
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 248 bytes
コンパイル時間 81 ms
コンパイル使用メモリ 10,748 KB
実行使用メモリ 8,264 KB
最終ジャッジ日時 2023-08-26 04:20:01
合計ジャッジ時間 4,476 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,844 KB
testcase_01 AC 13 ms
7,848 KB
testcase_02 AC 13 ms
7,848 KB
testcase_03 AC 15 ms
7,876 KB
testcase_04 AC 14 ms
7,848 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 14 ms
7,840 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 15 ms
7,776 KB
testcase_11 AC 14 ms
7,832 KB
testcase_12 AC 13 ms
7,844 KB
testcase_13 AC 13 ms
7,844 KB
testcase_14 AC 14 ms
7,848 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 15 ms
7,856 KB
testcase_21 AC 14 ms
7,944 KB
testcase_22 AC 15 ms
7,796 KB
testcase_23 AC 14 ms
7,808 KB
testcase_24 AC 15 ms
7,992 KB
testcase_25 WA -
testcase_26 AC 14 ms
7,824 KB
testcase_27 AC 14 ms
7,844 KB
testcase_28 AC 13 ms
7,900 KB
testcase_29 AC 14 ms
7,952 KB
testcase_30 AC 14 ms
7,880 KB
testcase_31 WA -
testcase_32 AC 14 ms
7,756 KB
testcase_33 AC 13 ms
7,852 KB
testcase_34 AC 14 ms
7,844 KB
testcase_35 WA -
testcase_36 AC 14 ms
7,932 KB
testcase_37 AC 13 ms
7,800 KB
testcase_38 AC 13 ms
7,804 KB
testcase_39 WA -
testcase_40 AC 15 ms
7,836 KB
testcase_41 AC 13 ms
7,804 KB
testcase_42 AC 14 ms
7,996 KB
testcase_43 AC 13 ms
7,960 KB
testcase_44 AC 13 ms
7,804 KB
testcase_45 AC 13 ms
7,848 KB
testcase_46 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
m = int(input())
if n<m: print("NaN"); exit()
dp = [[0]*(n+1) for _ in range(n+1)]
for i in range(1,n+1): dp[i][1] = 1
for i in range(2,n+1):
    for j in range(2,i+1):
        dp[i][j] = j*dp[i-1][j-1]+j*dp[i-1][j]
print(dp[n][m])
0