結果
問題 |
No.5 数字のブロック
|
ユーザー |
|
提出日時 | 2017-04-19 09:03:24 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 322 bytes |
コンパイル時間 | 104 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 11,904 KB |
最終ジャッジ日時 | 2024-11-18 10:59:58 |
合計ジャッジ時間 | 2,061 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 34 |
ソースコード
# 標準入力から一行分を読み出し、文字列として格納する。 L = int(input()) N = input() W_ipt = input().split() W = [int(w) for w in W_ipt] sortedW = sorted(W) sum_ = 0 count = 0 for w in sortedW: sum_ += w if sum_ <= L: count +=1 else: break print(str(count) + '\n')