結果
| 問題 | No.5 数字のブロック |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-04-19 09:03:24 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 322 bytes |
| 記録 | |
| コンパイル時間 | 410 ms |
| コンパイル使用メモリ | 20,824 KB |
| 実行使用メモリ | 15,488 KB |
| 最終ジャッジ日時 | 2026-05-12 23:00:12 |
| 合計ジャッジ時間 | 5,014 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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')