





'''simple docstring'''






from __future__ import annotations

from math import ceil, floor, sqrt





def       lowercase_      (		lowercase__ = 200_0000						)   ->int:
						_snake_case:   list[int]  					=		[0]
						_snake_case:   int

						for idx in range(1				,  ceil(sqrt(target * 2						) * 1.1						)						):
												triangle_numbers.append(triangle_numbers[-1] + idx						)

						# we want this to be as close as possible to target
						_snake_case:   int  					=		0
						# the area corresponding to the grid that gives the product closest to target
						_snake_case:   int  					=		0
						# an estimate of b, using the quadratic formula
						_snake_case:   float
						# the largest integer less than b_estimate
						_snake_case:   int
						# the largest integer less than b_estimate
						_snake_case:   int
						# the triangle number corresponding to b_floor
						_snake_case:   int
						# the triangle number corresponding to b_ceil
						_snake_case:   int

						for idx_a, triangle_a in enumerate(triangle_numbers[1:]				,  1						):
												_snake_case:   Any  					=		(-1 + sqrt(1 + 8 * target / triangle_a						)) / 2
												_snake_case:   str  					=		floor(lowercase__						)
												_snake_case:   Union[str, Any]  					=		ceil(lowercase__						)
												_snake_case:   Dict  					=		triangle_numbers[b_floor]
												_snake_case:   Any  					=		triangle_numbers[b_ceil]

												if abs(target - triangle_b_first_guess * triangle_a						) < abs(
												    target - best_product						):
																		_snake_case:   Dict  					=		triangle_b_first_guess * triangle_a
																		_snake_case:   Optional[Any]  					=		idx_a * b_floor

												if abs(target - triangle_b_second_guess * triangle_a						) < abs(
												    target - best_product						):
																		_snake_case:   Optional[int]  					=		triangle_b_second_guess * triangle_a
																		_snake_case:   Optional[int]  					=		idx_a * b_ceil

						return area


if __name__ == "__main__":
		print(F'{solution() = }')












'''simple docstring'''






from ..utils import DummyObject, requires_backends







class 			lowerCamelCase					(						metaclass=__UpperCAmelCase  ):
					_SCREAMING_SNAKE_CASE							   =    ["torch", "scipy"]


					def __init__(					self	:  Tuple       ,     *__snake_case	:  List[Any]       ,     **__snake_case	:  List[Any]       ):





											'''simple docstring'''





											requires_backends(self       ,     ['torch', 'scipy']       )


					@classmethod
					def    SCREAMING_SNAKE_CASE_		(					cls	:  Optional[int]       ,     *__snake_case	:  Optional[Any]       ,     **__snake_case	:  Tuple       ):





											'''simple docstring'''





											requires_backends(cls       ,     ['torch', 'scipy']       )




					@classmethod
					def    SCREAMING_SNAKE_CASE_		(					cls	:  List[Any]       ,     *__snake_case	:  Optional[Any]       ,     **__snake_case	:  str       ):





											'''simple docstring'''





											requires_backends(cls       ,     ['torch', 'scipy']       )





