




from __future__ import annotations

from math import ceil, floor, sqrt







def 			_a   (		SCREAMING_SNAKE_CASE_							:       int = 2_00_00_00  ):
					__lowerCAmelCase            = [0]
					__lowerCAmelCase            = 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            = 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            = 42
					# the largest integer less than b_estimate
					__lowerCAmelCase            = 42
					# the largest integer less than b_estimate
					__lowerCAmelCase            = 42
					# the triangle number corresponding to b_floor
					__lowerCAmelCase            = 42
					# the triangle number corresponding to b_ceil
					__lowerCAmelCase            = 42

					for idx_a, triangle_a in enumerate(triangle_numbers[1:]   ,   1  ):
										__lowerCAmelCase            = (-1 + sqrt(1 + 8 * target / triangle_a  )) / 2
										__lowerCAmelCase            = floor(SCREAMING_SNAKE_CASE_  )
										__lowerCAmelCase            = ceil(SCREAMING_SNAKE_CASE_  )
										__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_tf_available, is_torch_available


UpperCamelCase__					    =    {
    """configuration_ctrl""": ["""CTRL_PRETRAINED_CONFIG_ARCHIVE_MAP""", """CTRLConfig"""],
    """tokenization_ctrl""": ["""CTRLTokenizer"""],
}

try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					UpperCamelCase__					    =    [
					    """CTRL_PRETRAINED_MODEL_ARCHIVE_LIST""",
					    """CTRLForSequenceClassification""",
					    """CTRLLMHeadModel""",
					    """CTRLModel""",
					    """CTRLPreTrainedModel""",
					]

try:
					if not is_tf_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					UpperCamelCase__					    =    [
					    """TF_CTRL_PRETRAINED_MODEL_ARCHIVE_LIST""",
					    """TFCTRLForSequenceClassification""",
					    """TFCTRLLMHeadModel""",
					    """TFCTRLModel""",
					    """TFCTRLPreTrainedModel""",
					]


if TYPE_CHECKING:
					from .configuration_ctrl import CTRL_PRETRAINED_CONFIG_ARCHIVE_MAP, CTRLConfig
					from .tokenization_ctrl import CTRLTokenizer

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_ctrl import (
										    CTRL_PRETRAINED_MODEL_ARCHIVE_LIST,
										    CTRLForSequenceClassification,
										    CTRLLMHeadModel,
										    CTRLModel,
										    CTRLPreTrainedModel,
										)

					try:
										if not is_tf_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_tf_ctrl import (
										    TF_CTRL_PRETRAINED_MODEL_ARCHIVE_LIST,
										    TFCTRLForSequenceClassification,
										    TFCTRLLMHeadModel,
										    TFCTRLModel,
										    TFCTRLPreTrainedModel,
										)

else:
					import sys

					UpperCamelCase__					    =    _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)




