結果

問題 No.5 数字のブロック
ユーザー yohei-kuyohei-ku
提出日時 2018-03-26 23:15:37
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 261 bytes
コンパイル時間 238 ms
コンパイル使用メモリ 6,596 KB
実行使用メモリ 7,964 KB
最終ジャッジ日時 2023-09-07 18:31:03
合計ジャッジ時間 29,499 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
6,124 KB
testcase_01 AC 12 ms
6,100 KB
testcase_02 WA -
testcase_03 AC 1,360 ms
7,244 KB
testcase_04 AC 869 ms
6,864 KB
testcase_05 AC 2,211 ms
7,736 KB
testcase_06 AC 978 ms
7,196 KB
testcase_07 AC 643 ms
6,832 KB
testcase_08 AC 1,293 ms
7,320 KB
testcase_09 AC 171 ms
6,496 KB
testcase_10 AC 2,766 ms
7,660 KB
testcase_11 AC 694 ms
6,792 KB
testcase_12 AC 1,452 ms
7,476 KB
testcase_13 AC 2,234 ms
7,728 KB
testcase_14 AC 12 ms
6,148 KB
testcase_15 AC 14 ms
6,188 KB
testcase_16 AC 2,330 ms
7,756 KB
testcase_17 AC 3,152 ms
7,840 KB
testcase_18 AC 2,857 ms
7,832 KB
testcase_19 AC 3,459 ms
7,964 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 11 ms
5,980 KB
testcase_24 AC 16 ms
6,100 KB
testcase_25 AC 24 ms
6,144 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 844 ms
6,688 KB
testcase_30 AC 216 ms
6,448 KB
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

L = input()
N = input()
group = []

W = raw_input()

for i in range(0,N):
    split_W =W.split()
    a = int(split_W[i])
    group.append(a)    
group.sort()

for i in range(0,N+1):
    g = group[0:i]
    if sum(g) > L:
        print len(g[0:i])-1
        break
0