結果

問題 No.5 数字のブロック
ユーザー ddsyg1
提出日時 2019-01-15 15:18:38
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 171 bytes
コンパイル時間 275 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 59,904 KB
最終ジャッジ日時 2024-06-24 23:49:46
合計ジャッジ時間 3,062 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5 WA * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

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

cnt = 0
N2 = sorted(N)

for x in range(M-1):
	L -= N2[x]
	cnt = x+1

	if L <= 0:
		break
print(cnt)
0