結果
| 問題 |
No.5 数字のブロック
|
| コンテスト | |
| ユーザー |
lunaticcry
|
| 提出日時 | 2016-01-27 20:41:47 |
| 言語 | Python2 (2.7.18) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 242 bytes |
| コンパイル時間 | 163 ms |
| コンパイル使用メモリ | 7,040 KB |
| 実行使用メモリ | 7,168 KB |
| 最終ジャッジ日時 | 2024-09-21 17:40:28 |
| 合計ジャッジ時間 | 1,492 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 RE * 10 |
ソースコード
# -*- coding: utf-8 -*-
__author__ = 'yuuki'
#No.5 数字のブロック
L = int(input())
N = int(input())
W = map(int,raw_input().split())
W.sort()
i = 0
C = 0
while(1):
C += W[i]
if C > L:
print i
break
i += 1
lunaticcry