結果
| 問題 | No.8046 yukicoderの過去問 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-08-23 16:32:41 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 468 bytes |
| コンパイル時間 | 237 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 64,896 KB |
| 最終ジャッジ日時 | 2024-10-15 18:44:55 |
| 合計ジャッジ時間 | 1,468 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 9 |
ソースコード
import sys
import numpy as np
sys.setrecursionlimit(10 ** 9)
K = int(input())
N = int(input())
X = np.array(list(map(int, input().split())))
P = 10 ** 9 + 7
note = np.full(K + 1, -1)
note[0] = 0
def main(x):
if note[x] != -1:
return note[x]
note[x] = 0
for i in range(np.searchsorted(X, x)):
note[x] += main(x - X[i])
note[x] %= P
return note[x]
print(main(K))