結果
| 問題 |
No.129 お年玉(2)
|
| コンテスト | |
| ユーザー |
convexineq
|
| 提出日時 | 2020-12-05 00:20:21 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 723 ms / 5,000 ms |
| コード長 | 212 bytes |
| コンパイル時間 | 333 ms |
| コンパイル使用メモリ | 82,084 KB |
| 実行使用メモリ | 78,720 KB |
| 最終ジャッジ日時 | 2024-09-15 09:18:04 |
| 合計ジャッジ時間 | 18,440 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 46 |
ソースコード
n = int(input())
m = int(input())
MOD = 10**9
dp = [0]*(m+1)
dp[0] = 1
for _ in range(m):
ndp = dp[:]
for j in range(m+1):
ndp[j] += dp[j-1]
ndp[j] %= MOD
dp = ndp
print(dp[n//1000%m])
convexineq