結果

問題 No.5 数字のブロック
ユーザー convexineqconvexineq
提出日時 2020-11-22 23:44:22
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 188 bytes
コンパイル時間 266 ms
コンパイル使用メモリ 87,264 KB
実行使用メモリ 76,524 KB
最終ジャッジ日時 2023-09-30 23:07:48
合計ジャッジ時間 4,230 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,460 KB
testcase_01 AC 72 ms
71,344 KB
testcase_02 WA -
testcase_03 AC 74 ms
76,272 KB
testcase_04 AC 78 ms
76,328 KB
testcase_05 WA -
testcase_06 AC 77 ms
75,916 KB
testcase_07 AC 76 ms
76,356 KB
testcase_08 AC 81 ms
76,052 KB
testcase_09 AC 74 ms
76,288 KB
testcase_10 AC 78 ms
76,132 KB
testcase_11 AC 77 ms
76,192 KB
testcase_12 AC 80 ms
76,340 KB
testcase_13 AC 79 ms
76,276 KB
testcase_14 AC 71 ms
71,348 KB
testcase_15 WA -
testcase_16 AC 77 ms
76,132 KB
testcase_17 AC 77 ms
75,920 KB
testcase_18 AC 81 ms
76,300 KB
testcase_19 AC 79 ms
76,152 KB
testcase_20 AC 71 ms
71,488 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 71 ms
71,436 KB
testcase_24 AC 72 ms
71,400 KB
testcase_25 AC 71 ms
71,284 KB
testcase_26 AC 71 ms
71,340 KB
testcase_27 AC 71 ms
71,376 KB
testcase_28 AC 71 ms
71,544 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 70 ms
71,356 KB
testcase_32 AC 71 ms
71,312 KB
testcase_33 AC 69 ms
71,280 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
readline = sys.stdin.readline
read = sys.stdin.read

w,_,*a = map(int,read().split())
a.sort()
d = ans = 0
for i in a:
    if d+i < w:
        d += i
        ans += 1
print(ans)
0