結果
| 問題 |
No.5 数字のブロック
|
| ユーザー |
Rute
|
| 提出日時 | 2020-03-04 21:56:42 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 37 ms / 5,000 ms |
| コード長 | 233 bytes |
| コンパイル時間 | 102 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 11,648 KB |
| 最終ジャッジ日時 | 2024-10-14 00:33:25 |
| 合計ジャッジ時間 | 2,152 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 34 |
ソースコード
L = int(input())
P = int(input())
A = list(map(int,input().split()))
now = 0
ans = 0
A.sort()
for i in range(P):
now += A[i]
if now > L:
print(ans)
break
else:
ans += 1
if ans == P:
print(ans)
Rute