結果
| 問題 |
No.5 数字のブロック
|
| コンテスト | |
| ユーザー |
HIROPON87069639
|
| 提出日時 | 2016-02-27 16:55:16 |
| 言語 | Python2 (2.7.18) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 201 bytes |
| コンパイル時間 | 171 ms |
| コンパイル使用メモリ | 6,944 KB |
| 実行使用メモリ | 7,296 KB |
| 最終ジャッジ日時 | 2024-09-24 11:41:09 |
| 合計ジャッジ時間 | 1,865 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 27 WA * 7 |
ソースコード
# -*- 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