結果
| 問題 |
No.5 数字のブロック
|
| ユーザー |
|
| 提出日時 | 2020-05-06 13:01:02 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 44 ms / 5,000 ms |
| コード長 | 197 bytes |
| コンパイル時間 | 193 ms |
| コンパイル使用メモリ | 82,008 KB |
| 実行使用メモリ | 61,392 KB |
| 最終ジャッジ日時 | 2024-06-28 13:57:53 |
| 合計ジャッジ時間 | 2,608 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 34 |
ソースコード
Size=int(input())
N=int(input())
W=list(map(int,input().split()))
W.sort()
cnt=0
Sum=0
for i in range(N):
if Sum+W[i]<=Size:
cnt+=1
Sum+=W[i]
else:
break
print(cnt)