結果
| 問題 |
No.617 Nafmo、買い出しに行く
|
| コンテスト | |
| ユーザー |
liny_tail
|
| 提出日時 | 2020-09-17 22:51:40 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 349 bytes |
| コンパイル時間 | 186 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 18,588 KB |
| 最終ジャッジ日時 | 2024-06-22 07:14:32 |
| 合計ジャッジ時間 | 3,850 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 2 |
| other | AC * 3 TLE * 1 -- * 16 |
ソースコード
N, K = [int(i) for i in input().strip().split(' ')]
A = [int(input().strip()) for _ in range(N)]
lst = []
for i in A:
lst2 = []
for j in lst:
if j + i <= K:
if not(j + i in lst):
lst2.append(j + i)
for j in lst2:
lst.append(j)
if not(A in lst) and i <= K:
lst.append(i)
print(sorted(lst, reverse=True)[0])
liny_tail