結果

問題 No.5 数字のブロック
ユーザー ABKZABKZ
提出日時 2021-06-11 10:09:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 82 ms / 5,000 ms
コード長 150 bytes
コンパイル時間 749 ms
コンパイル使用メモリ 86,864 KB
実行使用メモリ 76,176 KB
最終ジャッジ日時 2023-08-20 21:20:00
合計ジャッジ時間 4,600 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,172 KB
testcase_01 AC 75 ms
71,260 KB
testcase_02 AC 75 ms
71,292 KB
testcase_03 AC 80 ms
76,060 KB
testcase_04 AC 81 ms
76,012 KB
testcase_05 AC 81 ms
76,176 KB
testcase_06 AC 81 ms
75,976 KB
testcase_07 AC 81 ms
76,080 KB
testcase_08 AC 80 ms
75,928 KB
testcase_09 AC 79 ms
76,016 KB
testcase_10 AC 82 ms
76,152 KB
testcase_11 AC 79 ms
76,092 KB
testcase_12 AC 78 ms
76,096 KB
testcase_13 AC 81 ms
76,004 KB
testcase_14 AC 76 ms
71,360 KB
testcase_15 AC 76 ms
71,212 KB
testcase_16 AC 81 ms
76,032 KB
testcase_17 AC 82 ms
76,052 KB
testcase_18 AC 81 ms
76,008 KB
testcase_19 AC 80 ms
76,076 KB
testcase_20 AC 76 ms
71,360 KB
testcase_21 AC 76 ms
71,364 KB
testcase_22 AC 75 ms
71,312 KB
testcase_23 AC 73 ms
70,940 KB
testcase_24 AC 74 ms
71,052 KB
testcase_25 AC 75 ms
71,316 KB
testcase_26 AC 75 ms
71,316 KB
testcase_27 AC 76 ms
71,284 KB
testcase_28 AC 75 ms
71,304 KB
testcase_29 AC 82 ms
76,016 KB
testcase_30 AC 80 ms
76,112 KB
testcase_31 AC 76 ms
71,064 KB
testcase_32 AC 75 ms
71,292 KB
testcase_33 AC 76 ms
71,124 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

L = int(input())
N = int(input())
W = list(map(int, input().split()))
W.sort()

ans = 0
for i in W:
  L = L - i
  if L >= 0:
    ans += 1

print(ans)
0