結果
| 問題 |
No.617 Nafmo、買い出しに行く
|
| コンテスト | |
| ユーザー |
FVRChan
|
| 提出日時 | 2018-05-06 15:53:54 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 279 bytes |
| コンパイル時間 | 119 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-06-28 02:09:04 |
| 合計ジャッジ時間 | 1,666 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 9 WA * 4 RE * 7 |
ソースコード
n,k=list(map(int,input().split()))
now=k
a=sorted([int(input()) for i in range(n)],reverse=True)
index=0
min_value=min(a)
while True:
if min_value>now:
break
elif now-a[index]>=0:
now-=a[index]
a.pop(index)
else:
index+=1
print(k-now)
FVRChan