結果
| 問題 |
No.5 数字のブロック
|
| コンテスト | |
| ユーザー |
tnodino
|
| 提出日時 | 2022-01-30 13:57:20 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 241 bytes |
| コンパイル時間 | 139 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 21,760 KB |
| 最終ジャッジ日時 | 2024-06-11 08:15:01 |
| 合計ジャッジ時間 | 4,379 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 34 |
ソースコード
from turtle import width
L = int(input())
N = int(input())
W = list(map(int,input().split()))
W.sort()
Width = 0
ans = 0
for i in range(N):
if Width + W[i] <= L:
Width += W[i]
ans += 1
else:
break
print(ans)
tnodino