結果
| 問題 |
No.5 数字のブロック
|
| ユーザー |
convexineq
|
| 提出日時 | 2020-11-22 23:44:46 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 43 ms / 5,000 ms |
| コード長 | 190 bytes |
| コンパイル時間 | 361 ms |
| コンパイル使用メモリ | 82,384 KB |
| 実行使用メモリ | 62,380 KB |
| 最終ジャッジ日時 | 2024-07-23 16:49:04 |
| 合計ジャッジ時間 | 2,592 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 34 |
ソースコード
import sys
readline = sys.stdin.readline
read = sys.stdin.read
w,_,*a = map(int,read().split())
a.sort()
d = ans = 0
for i in a:
if d+i <= w:
d += i
ans += 1
print(ans)
convexineq