結果

問題 No.5 数字のブロック
ユーザー あかりきあかりき
提出日時 2021-02-08 06:19:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 83 ms / 5,000 ms
コード長 153 bytes
コンパイル時間 1,450 ms
コンパイル使用メモリ 86,544 KB
実行使用メモリ 75,720 KB
最終ジャッジ日時 2023-09-18 09:30:19
合計ジャッジ時間 4,570 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,032 KB
testcase_01 AC 76 ms
70,992 KB
testcase_02 AC 76 ms
70,800 KB
testcase_03 AC 83 ms
75,572 KB
testcase_04 AC 81 ms
75,292 KB
testcase_05 AC 81 ms
75,216 KB
testcase_06 AC 80 ms
75,288 KB
testcase_07 AC 81 ms
75,276 KB
testcase_08 AC 82 ms
75,268 KB
testcase_09 AC 81 ms
75,256 KB
testcase_10 AC 79 ms
75,236 KB
testcase_11 AC 80 ms
75,296 KB
testcase_12 AC 80 ms
75,264 KB
testcase_13 AC 80 ms
75,720 KB
testcase_14 AC 76 ms
70,928 KB
testcase_15 AC 75 ms
71,212 KB
testcase_16 AC 80 ms
75,264 KB
testcase_17 AC 82 ms
75,160 KB
testcase_18 AC 81 ms
75,448 KB
testcase_19 AC 81 ms
75,568 KB
testcase_20 AC 77 ms
70,936 KB
testcase_21 AC 76 ms
71,064 KB
testcase_22 AC 76 ms
70,804 KB
testcase_23 AC 77 ms
70,996 KB
testcase_24 AC 76 ms
71,032 KB
testcase_25 AC 77 ms
71,020 KB
testcase_26 AC 78 ms
71,032 KB
testcase_27 AC 78 ms
70,892 KB
testcase_28 AC 77 ms
71,000 KB
testcase_29 AC 80 ms
75,200 KB
testcase_30 AC 81 ms
75,208 KB
testcase_31 AC 76 ms
71,104 KB
testcase_32 AC 76 ms
70,864 KB
testcase_33 AC 76 ms
71,080 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

l=int(input())
n=int(input())
w=list(map(int,input().split()))
w.sort()
len=0
for i in range(n):
  len+=w[i]
  if len>l:
    print(i)
    exit()
print(n)
0