結果
問題 |
No.617 Nafmo、買い出しに行く
|
ユーザー |
![]() |
提出日時 | 2020-01-02 23:11:43 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 328 bytes |
コンパイル時間 | 216 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-11-22 18:30:20 |
合計ジャッジ時間 | 1,836 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 9 WA * 11 |
ソースコード
input_list = list(map(int,input().split())) n, k = input_list a_list = [] a_list = [int(input()) for i in range(n)] target = k res = 0 while True: cur_list = [e for e in a_list if e <= target] if not cur_list: break else: res += max(cur_list) target -= max(cur_list) print(res)