結果
| 問題 | No.2424 Josouzai |
| コンテスト | |
| ユーザー |
taro2023
|
| 提出日時 | 2023-08-18 22:43:46 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 173 ms / 2,000 ms |
| コード長 | 254 bytes |
| 記録 | |
| コンパイル時間 | 821 ms |
| コンパイル使用メモリ | 20,828 KB |
| 実行使用メモリ | 35,888 KB |
| 最終ジャッジ日時 | 2026-05-22 10:42:05 |
| 合計ジャッジ時間 | 8,552 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 33 |
ソースコード
a,b= map(int, input().split())
c = list(map(int, input().split()))
c=sorted(c)
e=0
if c[0]>b:
print(0,b-c[0])
exit()
for i in range(len(c)):
e+=c[i]
if e>b:
e-=c[i]
break
if i==0:
print(i+1,b-e)
else:
print(i,b-e)
taro2023