結果
| 問題 |
No.8046 yukicoderの過去問
|
| コンテスト | |
| ユーザー |
mattu34
|
| 提出日時 | 2023-04-05 18:09:28 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 218 bytes |
| コンパイル時間 | 523 ms |
| コンパイル使用メモリ | 82,048 KB |
| 実行使用メモリ | 88,192 KB |
| 最終ジャッジ日時 | 2024-10-02 02:23:17 |
| 合計ジャッジ時間 | 4,425 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 TLE * 1 -- * 2 |
ソースコード
MOD=10**9+7
K=int(input())
N=int(input())
dp=[0]*(K+1)
dp[0]=1
x=list(map(int,input().split()))
for i in range(K):
for xx in x:
if i+xx<=K:
dp[i+xx]+=dp[i]
dp[i+xx]%=MOD
print(dp[K])
mattu34