



from __future__ import annotations

from math import ceil, floor, sqrt






def        A       (      _lowerCamelCase = 2_000_000						):





							'''simple docstring'''




							_lowerCAmelCase  :							Optional[Any]				     =					[0]
							_lowerCAmelCase  :							Union[str, Any]				     =					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
							_lowerCAmelCase  :							Union[str, Any]				     =					0
							# the area corresponding to the grid that gives the product closest to target
							_lowerCAmelCase  :							Union[str, Any]				     =					0
							# an estimate of b, using the quadratic formula
							_lowerCAmelCase  :							Any				     =					42
							# the largest integer less than b_estimate
							_lowerCAmelCase  :							str				     =					42
							# the largest integer less than b_estimate
							_lowerCAmelCase  :							Dict				     =					42
							# the triangle number corresponding to b_floor
							_lowerCAmelCase  :							Any				     =					42
							# the triangle number corresponding to b_ceil
							_lowerCAmelCase  :							Tuple				     =					42

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

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

														if abs(target - triangle_b_second_guess * triangle_a						) < abs(
														    target - best_product						):
																					_lowerCAmelCase  :							str				     =					triangle_b_second_guess * triangle_a
																					_lowerCAmelCase  :							Union[str, Any]				     =					idx_a * b_ceil

							return area


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






import copy

from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ..auto.configuration_auto import CONFIG_MAPPING


_snake_case	=						logging.get_logger(__name__)



class 						UpperCAmelCase_					( a):
							lowerCamelCase__         =	'upernet'







							def __init__(     self,    __a=None,    __a=512,    __a=0.02,    __a=[1, 2, 3, 6],    __a=True,    __a=0.4,    __a=384,    __a=256,    __a=1,    __a=False,    __a=255,    **__a,    ):

														'''simple docstring'''

														super().__init__(**__a)

														if backbone_config is None:
																					logger.info("`backbone_config` is `None`. Initializing the config with the default `ResNet` backbone.")
																					_lowerCAmelCase  :							List[str]				     =					CONFIG_MAPPING["resnet"](out_features=["stage1", "stage2", "stage3", "stage4"])
														elif isinstance(__a,    __a):
																					_lowerCAmelCase  :							List[Any]				     =					backbone_config.get("model_type")
																					_lowerCAmelCase  :							Dict				     =					CONFIG_MAPPING[backbone_model_type]
																					_lowerCAmelCase  :							Optional[Any]				     =					config_class.from_dict(__a)

														_lowerCAmelCase  :							Tuple				     =					backbone_config
														_lowerCAmelCase  :							List[Any]				     =					hidden_size
														_lowerCAmelCase  :							Union[str, Any]				     =					initializer_range
														_lowerCAmelCase  :							str				     =					pool_scales
														_lowerCAmelCase  :							List[str]				     =					use_auxiliary_head
														_lowerCAmelCase  :							Dict				     =					auxiliary_loss_weight
														_lowerCAmelCase  :							Tuple				     =					auxiliary_in_channels
														_lowerCAmelCase  :							Optional[Any]				     =					auxiliary_channels
														_lowerCAmelCase  :							str				     =					auxiliary_num_convs
														_lowerCAmelCase  :							Union[str, Any]				     =					auxiliary_concat_input
														_lowerCAmelCase  :							Dict				     =					loss_ignore_index







							def      snake_case__   (     self):

														'''simple docstring'''

														_lowerCAmelCase  :							Any				     =					copy.deepcopy(self.__dict__)
														_lowerCAmelCase  :							List[Any]				     =					self.backbone_config.to_dict()
														_lowerCAmelCase  :							Optional[Any]				     =					self.__class__.model_type
														return output
