
"""simple docstring"""



from __future__ import annotations

from math import ceil, floor, sqrt


def lowerCamelCase_				(     _lowerCamelCase			:	List[str] = 2_0_0_0_0_0_0				):
       lowerCamelCase_       							=		[0]
       lowerCamelCase_       							=		4_2

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

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

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

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

       return area


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

from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_flax_available, is_torch_available


__A							={
    '''configuration_gpt_neo''': ['''GPT_NEO_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''GPTNeoConfig''', '''GPTNeoOnnxConfig'''],
}

try:
			if not is_torch_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			__A							=[
			    '''GPT_NEO_PRETRAINED_MODEL_ARCHIVE_LIST''',
			    '''GPTNeoForCausalLM''',
			    '''GPTNeoForQuestionAnswering''',
			    '''GPTNeoForSequenceClassification''',
			    '''GPTNeoForTokenClassification''',
			    '''GPTNeoModel''',
			    '''GPTNeoPreTrainedModel''',
			    '''load_tf_weights_in_gpt_neo''',
			]

try:
			if not is_flax_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			__A							=[
			    '''FlaxGPTNeoForCausalLM''',
			    '''FlaxGPTNeoModel''',
			    '''FlaxGPTNeoPreTrainedModel''',
			]


if TYPE_CHECKING:
			from .configuration_gpt_neo import GPT_NEO_PRETRAINED_CONFIG_ARCHIVE_MAP, GPTNeoConfig, GPTNeoOnnxConfig

			try:
						if not is_torch_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_gpt_neo import (
						    GPT_NEO_PRETRAINED_MODEL_ARCHIVE_LIST,
						    GPTNeoForCausalLM,
						    GPTNeoForQuestionAnswering,
						    GPTNeoForSequenceClassification,
						    GPTNeoForTokenClassification,
						    GPTNeoModel,
						    GPTNeoPreTrainedModel,
						    load_tf_weights_in_gpt_neo,
						)

			try:
						if not is_flax_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_flax_gpt_neo import FlaxGPTNeoForCausalLM, FlaxGPTNeoModel, FlaxGPTNeoPreTrainedModel


else:
			import sys

			__A							=_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)


