結果

問題 No.5 数字のブロック
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2021-04-05 10:29:47
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 77 ms / 5,000 ms
コード長 181 bytes
コンパイル時間 360 ms
コンパイル使用メモリ 86,668 KB
実行使用メモリ 75,892 KB
最終ジャッジ日時 2023-08-28 22:33:56
合計ジャッジ時間 4,484 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
70,832 KB
testcase_01 AC 72 ms
71,048 KB
testcase_02 AC 72 ms
71,224 KB
testcase_03 AC 77 ms
75,300 KB
testcase_04 AC 76 ms
75,492 KB
testcase_05 AC 76 ms
75,672 KB
testcase_06 AC 76 ms
75,408 KB
testcase_07 AC 76 ms
75,332 KB
testcase_08 AC 76 ms
75,376 KB
testcase_09 AC 74 ms
75,336 KB
testcase_10 AC 75 ms
75,400 KB
testcase_11 AC 75 ms
75,740 KB
testcase_12 AC 76 ms
75,360 KB
testcase_13 AC 77 ms
75,624 KB
testcase_14 AC 71 ms
71,060 KB
testcase_15 AC 72 ms
70,736 KB
testcase_16 AC 76 ms
75,492 KB
testcase_17 AC 76 ms
75,396 KB
testcase_18 AC 74 ms
75,892 KB
testcase_19 AC 74 ms
75,624 KB
testcase_20 AC 70 ms
71,236 KB
testcase_21 AC 71 ms
70,968 KB
testcase_22 AC 71 ms
71,096 KB
testcase_23 AC 72 ms
70,956 KB
testcase_24 AC 72 ms
71,204 KB
testcase_25 AC 71 ms
70,880 KB
testcase_26 AC 72 ms
71,156 KB
testcase_27 AC 72 ms
71,168 KB
testcase_28 AC 73 ms
71,060 KB
testcase_29 AC 76 ms
75,324 KB
testcase_30 AC 76 ms
75,316 KB
testcase_31 AC 71 ms
70,932 KB
testcase_32 AC 72 ms
71,196 KB
testcase_33 AC 72 ms
70,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

l = int(input())
n = int(input())
W = sorted(list(map(int,input().split())))
now = 0
for i,w in enumerate(W):
    now += w 
    if now > l:
        print(i)
        exit()
print(n)
0