

"""simple docstring"""






from __future__ import annotations

from math import ceil, floor, sqrt



def   lowercase_	(    _lowercase       :		int = 2_00_00_00	):




					'''simple docstring'''






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

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

										if abs(target - triangle_b_first_guess * triangle_a	) < abs(
										    target - best_product	):
															UpperCAmelCase			:   str      =				triangle_b_first_guess * triangle_a
															UpperCAmelCase			:   List[Any]      =				idx_a * b_floor

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

					return area


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





"""simple docstring"""






from typing import TYPE_CHECKING

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


snake_case_   :   Dict        =       {
    """configuration_mvp""": ["""MVP_PRETRAINED_CONFIG_ARCHIVE_MAP""", """MvpConfig""", """MvpOnnxConfig"""],
    """tokenization_mvp""": ["""MvpTokenizer"""],
}

try:
	if not is_tokenizers_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	snake_case_   :   List[Any]        =       ["""MvpTokenizerFast"""]

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	snake_case_   :   Any        =       [
	    """MVP_PRETRAINED_MODEL_ARCHIVE_LIST""",
	    """MvpForCausalLM""",
	    """MvpForConditionalGeneration""",
	    """MvpForQuestionAnswering""",
	    """MvpForSequenceClassification""",
	    """MvpModel""",
	    """MvpPreTrainedModel""",
	]

if TYPE_CHECKING:
	from .configuration_mvp import MVP_PRETRAINED_CONFIG_ARCHIVE_MAP, MvpConfig, MvpOnnxConfig
	from .tokenization_mvp import MvpTokenizer

	try:
		if not is_tokenizers_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .tokenization_mvp_fast import MvpTokenizerFast

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_mvp import (
		    MVP_PRETRAINED_MODEL_ARCHIVE_LIST,
		    MvpForCausalLM,
		    MvpForConditionalGeneration,
		    MvpForQuestionAnswering,
		    MvpForSequenceClassification,
		    MvpModel,
		    MvpPreTrainedModel,
		)

else:
	import sys

	snake_case_   :   List[str]        =       _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)


