


'''simple docstring'''



from __future__ import annotations

from math import ceil, floor, sqrt


def  lowerCamelCase__ (			A  :     int = 2_00_00_00	):




						'''simple docstring'''






						UpperCAmelCase								=      [0]
						UpperCAmelCase								=      42

						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
						UpperCAmelCase								=      0
						# the area corresponding to the grid that gives the product closest to target
						UpperCAmelCase								=      0
						# an estimate of b, using the quadratic formula
						UpperCAmelCase								=      42
						# the largest integer less than b_estimate
						UpperCAmelCase								=      42
						# the largest integer less than b_estimate
						UpperCAmelCase								=      42
						# the triangle number corresponding to b_floor
						UpperCAmelCase								=      42
						# the triangle number corresponding to b_ceil
						UpperCAmelCase								=      42

						for idx_a, triangle_a in enumerate(triangle_numbers[1:] ,  1	):
												UpperCAmelCase								=      (-1 + sqrt(1 + 8 * target / triangle_a	)) / 2
												UpperCAmelCase								=      floor(_UpperCAmelCase	)
												UpperCAmelCase								=      ceil(_UpperCAmelCase	)
												UpperCAmelCase								=      triangle_numbers[b_floor]
												UpperCAmelCase								=      triangle_numbers[b_ceil]

												if abs(target - triangle_b_first_guess * triangle_a	) < abs(
												    target - best_product	):
																		UpperCAmelCase								=      triangle_b_first_guess * triangle_a
																		UpperCAmelCase								=      idx_a * b_floor

												if abs(target - triangle_b_second_guess * triangle_a	) < abs(
												    target - best_product	):
																		UpperCAmelCase								=      triangle_b_second_guess * triangle_a
																		UpperCAmelCase								=      idx_a * b_ceil

						return area


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







from ...configuration_utils import PretrainedConfig
from ...utils import logging


UpperCamelCase_						:     Optional[int]	       =							logging.get_logger(__name__)




class   __lowercase						(						__snake_case       ):
	_A       =   "timm_backbone"






	def __init__(self				: Any      ,	snake_case				: List[Any]=None      ,	snake_case				: int=3      ,	snake_case				: Dict=True      ,	snake_case				: Union[str, Any]=True      ,	snake_case				: Any=None      ,	**snake_case				: int      ,	) ->			Optional[int]:
							super().__init__(**snake_case    )
							_lowercase       :	Dict           =   backbone
							_lowercase       :	Optional[Any]           =   num_channels
							_lowercase       :	Union[str, Any]           =   features_only
							_lowercase       :	Tuple           =   use_pretrained_backbone
							_lowercase       :	List[str]           =   True
							_lowercase       :	Tuple           =   out_indices if out_indices is not None else (-1,)




