




from __future__ import annotations

from math import ceil, floor, sqrt







def   _snake_case    (       lowercase__ = 2000000	):
				_lowerCamelCase  :    list[int]					=					[0]
				_lowerCamelCase  :    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
				_lowerCamelCase  :    int					=					0
				# the area corresponding to the grid that gives the product closest to target
				_lowerCamelCase  :    int					=					0
				# an estimate of b, using the quadratic formula
				_lowerCamelCase  :    float
				# the largest integer less than b_estimate
				_lowerCamelCase  :    int
				# the largest integer less than b_estimate
				_lowerCamelCase  :    int
				# the triangle number corresponding to b_floor
				_lowerCamelCase  :    int
				# the triangle number corresponding to b_ceil
				_lowerCamelCase  :    int

				for idx_a, triangle_a in enumerate(triangle_numbers[1:]							,					1	):
								_lowerCamelCase  :    int					=					(-1 + sqrt(1 + 8 * target / triangle_a	)) / 2
								_lowerCamelCase  :    int					=					floor(lowercase__	)
								_lowerCamelCase  :    List[Any]					=					ceil(lowercase__	)
								_lowerCamelCase  :    int					=					triangle_numbers[b_floor]
								_lowerCamelCase  :    Tuple					=					triangle_numbers[b_ceil]

								if abs(target - triangle_b_first_guess * triangle_a	) < abs(
								    target - best_product	):
												_lowerCamelCase  :    str					=					triangle_b_first_guess * triangle_a
												_lowerCamelCase  :    int					=					idx_a * b_floor

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

				return area


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





"""simple docstring"""






from __future__ import annotations

lowercase__  		=		10







def   _snake_case    (       lowercase__	):
				_lowerCamelCase  :    List[Any]					=					1
				_lowerCamelCase  :    Optional[int]					=					max(lowercase__	)
				while placement <= max_digit:
								# declare and initialize empty buckets
								_lowerCamelCase  :    list[list]					=					[[] for _ in range(lowercase__	)]
								# split list_of_ints between the buckets
								for i in list_of_ints:
												_lowerCamelCase  :    Dict					=					int((i / placement) % RADIX	)
												buckets[tmp].append(lowercase__	)
								# put each buckets' contents into list_of_ints
								_lowerCamelCase  :    str					=					0
								for b in range(lowercase__	):
												for i in buckets[b]:
																_lowerCamelCase  :    str					=					i
																a += 1
        # move to next
								placement *= RADIX
				return list_of_ints


if __name__ == "__main__":
			import doctest

			doctest.testmod()