結果

問題 No.5 数字のブロック
ユーザー pluto77pluto77
提出日時 2016-02-11 18:47:52
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 203 bytes
コンパイル時間 65 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 7,100 KB
最終ジャッジ日時 2023-10-21 23:24:54
合計ジャッジ時間 1,872 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
6,392 KB
testcase_01 AC 11 ms
6,392 KB
testcase_02 WA -
testcase_03 AC 15 ms
6,744 KB
testcase_04 AC 14 ms
6,568 KB
testcase_05 WA -
testcase_06 AC 15 ms
6,744 KB
testcase_07 AC 14 ms
6,624 KB
testcase_08 AC 15 ms
6,744 KB
testcase_09 AC 12 ms
6,536 KB
testcase_10 AC 17 ms
7,040 KB
testcase_11 AC 15 ms
6,608 KB
testcase_12 AC 16 ms
6,744 KB
testcase_13 AC 17 ms
7,008 KB
testcase_14 AC 11 ms
6,392 KB
testcase_15 WA -
testcase_16 AC 17 ms
7,040 KB
testcase_17 AC 18 ms
7,080 KB
testcase_18 AC 17 ms
7,052 KB
testcase_19 AC 18 ms
7,100 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 11 ms
6,392 KB
testcase_24 AC 12 ms
6,404 KB
testcase_25 AC 11 ms
6,416 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#coding: utf-8
##yuki_5

l=int(raw_input())
n=int(raw_input())
w=map(int,raw_input().split())

w.sort()
res=0
count=0
for i in xrange(n):
 if res<l:
  res+=w[i]
  count+=1
 else:
  break
 
print count-1
0