結果
| 問題 |
No.5 数字のブロック
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-12-02 12:00:47 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 35 ms / 5,000 ms |
| コード長 | 181 bytes |
| コンパイル時間 | 298 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 11,648 KB |
| 最終ジャッジ日時 | 2024-11-18 11:50:45 |
| 合計ジャッジ時間 | 2,222 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 34 |
ソースコード
m=int(input())
n=int(input())
w=list(map(int,input().split()))
w.sort()
count=0
sum=0
for i in range(n):
sum+=w[i]
count+=1
if m<sum:
count=count-1
print(count)