結果

問題 No.5 数字のブロック
ユーザー 🍡yurahuna🍡yurahuna
提出日時 2016-05-04 12:15:32
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 77 ms / 5,000 ms
コード長 194 bytes
コンパイル時間 455 ms
コンパイル使用メモリ 87,072 KB
実行使用メモリ 75,852 KB
最終ジャッジ日時 2023-08-11 15:01:17
合計ジャッジ時間 4,364 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
70,864 KB
testcase_01 AC 73 ms
71,224 KB
testcase_02 AC 76 ms
71,276 KB
testcase_03 AC 73 ms
75,636 KB
testcase_04 AC 73 ms
75,616 KB
testcase_05 AC 74 ms
75,692 KB
testcase_06 AC 75 ms
75,656 KB
testcase_07 AC 75 ms
75,636 KB
testcase_08 AC 76 ms
75,600 KB
testcase_09 AC 72 ms
75,852 KB
testcase_10 AC 74 ms
75,684 KB
testcase_11 AC 74 ms
75,612 KB
testcase_12 AC 72 ms
75,588 KB
testcase_13 AC 75 ms
75,608 KB
testcase_14 AC 71 ms
70,864 KB
testcase_15 AC 70 ms
71,248 KB
testcase_16 AC 77 ms
75,560 KB
testcase_17 AC 73 ms
75,532 KB
testcase_18 AC 73 ms
75,560 KB
testcase_19 AC 75 ms
75,600 KB
testcase_20 AC 74 ms
71,352 KB
testcase_21 AC 69 ms
71,012 KB
testcase_22 AC 69 ms
71,008 KB
testcase_23 AC 68 ms
71,400 KB
testcase_24 AC 71 ms
71,172 KB
testcase_25 AC 71 ms
71,276 KB
testcase_26 AC 70 ms
71,136 KB
testcase_27 AC 68 ms
71,228 KB
testcase_28 AC 71 ms
71,168 KB
testcase_29 AC 72 ms
75,596 KB
testcase_30 AC 72 ms
75,640 KB
testcase_31 AC 68 ms
71,136 KB
testcase_32 AC 71 ms
71,400 KB
testcase_33 AC 71 ms
71,280 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

L = int(input())
N = int(input())
W = list(map(int, input().split()))
W.sort()
W.append(10**8)
temp = 0
for i in range(len(W)):
    temp += W[i]
    if temp > L:
        print(i)
        exit()
0