"""simple docstring"""


from __future__ import annotations

from math import ceil, floor, sqrt






def      __UpperCAmelCase       (      lowercase = 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(lowercase		)
    _UpperCAmelCase    			=   ceil(lowercase		)
    _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() = }''')

"""simple docstring"""


from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_torch_available,
)


UpperCAmelCase__			=    {
    """configuration_gpt_bigcode""": ["""GPT_BIGCODE_PRETRAINED_CONFIG_ARCHIVE_MAP""", """GPTBigCodeConfig"""],
}

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    UpperCAmelCase__			=    [
        """GPT_BIGCODE_PRETRAINED_MODEL_ARCHIVE_LIST""",
        """GPTBigCodeForSequenceClassification""",
        """GPTBigCodeForTokenClassification""",
        """GPTBigCodeForCausalLM""",
        """GPTBigCodeModel""",
        """GPTBigCodePreTrainedModel""",
    ]

if TYPE_CHECKING:
    from .configuration_gpt_bigcode import GPT_BIGCODE_PRETRAINED_CONFIG_ARCHIVE_MAP, GPTBigCodeConfig

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_gpt_bigcode import (
            GPT_BIGCODE_PRETRAINED_MODEL_ARCHIVE_LIST,
            GPTBigCodeForCausalLM,
            GPTBigCodeForSequenceClassification,
            GPTBigCodeForTokenClassification,
            GPTBigCodeModel,
            GPTBigCodePreTrainedModel,
        )


else:
    import sys

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