結果
| 問題 |
No.8046 yukicoderの過去問
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-02-29 01:12:29 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 230 bytes |
| コンパイル時間 | 324 ms |
| コンパイル使用メモリ | 82,240 KB |
| 実行使用メモリ | 90,156 KB |
| 最終ジャッジ日時 | 2024-09-29 12:29:06 |
| 合計ジャッジ時間 | 4,392 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 TLE * 1 -- * 2 |
ソースコード
K = int(input())
N = int(input())
x = list(map(int, input().split()))
DP = [0]*(K+1)
DP[0] = 1
for i in range(K):
for xx in x:
if i+xx <= K:
DP[xx+i] = (DP[xx+i] + DP[i]) % (10**9+7)
print(DP[K]%(10**9+7))