結果
| 問題 |
No.2188 整数列コイントスゲーム
|
| コンテスト | |
| ユーザー |
ニックネーム
|
| 提出日時 | 2023-01-13 22:36:24 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 248 bytes |
| コンパイル時間 | 427 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-12-24 18:22:45 |
| 合計ジャッジ時間 | 6,241 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 33 WA * 14 |
ソースコード
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])
ニックネーム