結果
| 問題 | No.5 数字のブロック |
| コンテスト | |
| ユーザー |
HIROPON87069639
|
| 提出日時 | 2016-02-27 16:58:24 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
AC
|
| 実行時間 | 62 ms / 5,000 ms |
| + 200µs | |
| コード長 | 200 bytes |
| 記録 | |
| コンパイル時間 | 66 ms |
| コンパイル使用メモリ | 81,024 KB |
| 実行使用メモリ | 82,176 KB |
| 最終ジャッジ日時 | 2026-07-18 03:33:55 |
| 合計ジャッジ時間 | 4,205 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 34 |
ソースコード
# -*- coding: utf-8 -*-
L = input()
N = input()
W = map(int, raw_input().split())
W.sort()
tot = 0
cnt = 0
while tot < L and cnt < N:
tot += W[cnt]
cnt += 1
if L < tot:
cnt -= 1
print cnt
HIROPON87069639