結果

問題 No.5 数字のブロック
ユーザー vallyvally
提出日時 2023-08-28 12:15:27
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 201 bytes
コンパイル時間 380 ms
コンパイル使用メモリ 86,960 KB
実行使用メモリ 75,936 KB
最終ジャッジ日時 2023-08-28 12:15:33
合計ジャッジ時間 5,103 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
70,944 KB
testcase_01 AC 72 ms
71,116 KB
testcase_02 WA -
testcase_03 AC 82 ms
75,556 KB
testcase_04 AC 74 ms
75,452 KB
testcase_05 WA -
testcase_06 AC 77 ms
75,760 KB
testcase_07 AC 74 ms
75,800 KB
testcase_08 AC 75 ms
75,484 KB
testcase_09 AC 74 ms
75,528 KB
testcase_10 AC 78 ms
75,476 KB
testcase_11 AC 82 ms
75,628 KB
testcase_12 AC 75 ms
75,936 KB
testcase_13 AC 76 ms
75,456 KB
testcase_14 AC 71 ms
71,176 KB
testcase_15 WA -
testcase_16 AC 76 ms
75,932 KB
testcase_17 AC 76 ms
75,440 KB
testcase_18 AC 76 ms
75,576 KB
testcase_19 AC 74 ms
75,568 KB
testcase_20 AC 71 ms
70,860 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 70 ms
71,236 KB
testcase_24 AC 76 ms
71,280 KB
testcase_25 AC 70 ms
71,032 KB
testcase_26 AC 70 ms
71,028 KB
testcase_27 AC 70 ms
71,140 KB
testcase_28 AC 70 ms
71,288 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 70 ms
71,196 KB
testcase_32 AC 71 ms
70,972 KB
testcase_33 AC 71 ms
71,180 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

l = int(input())
n = int(input())
w = [int(i) for i in input().split()]
w.sort()
answer = 0
sum0 = 0
for i in w:
    sum0 += i
    if sum0 < l:
        answer += 1
    else:
        break
print(answer)
0