結果
| 問題 | No.5 数字のブロック |
| コンテスト | |
| ユーザー |
togatoga
|
| 提出日時 | 2015-02-10 02:12:46 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 104 ms / 5,000 ms |
| コード長 | 203 bytes |
| コンパイル時間 | 205 ms |
| コンパイル使用メモリ | 77,792 KB |
| 最終ジャッジ日時 | 2025-12-03 13:44:48 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 34 |
ソースコード
import sys
L = input()
N = input()
W = map(int, raw_input().split())
s = 0
for i, x in enumerate(sorted(W)):
if (s + x <= L):
s += x
else:
print i
sys.exit()
print len(W)
togatoga