





from __future__ import annotations

from math import ceil, floor, sqrt



def        __lowercase       (				_SCREAMING_SNAKE_CASE = 2_00_00_00     )			->       int:


      '''simple docstring'''


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

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

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

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

      return area


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









from typing import TYPE_CHECKING

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


SCREAMING_SNAKE_CASE_						       =	{"""configuration_reformer""": ["""REFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP""", """ReformerConfig"""]}

try:
      if not is_sentencepiece_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      SCREAMING_SNAKE_CASE_						       =	["""ReformerTokenizer"""]

try:
      if not is_tokenizers_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      SCREAMING_SNAKE_CASE_						       =	["""ReformerTokenizerFast"""]

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      SCREAMING_SNAKE_CASE_						       =	[
          """REFORMER_PRETRAINED_MODEL_ARCHIVE_LIST""",
          """ReformerAttention""",
          """ReformerForMaskedLM""",
          """ReformerForQuestionAnswering""",
          """ReformerForSequenceClassification""",
          """ReformerLayer""",
          """ReformerModel""",
          """ReformerModelWithLMHead""",
          """ReformerPreTrainedModel""",
      ]


if TYPE_CHECKING:
      from .configuration_reformer import REFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, ReformerConfig

      try:
            if not is_sentencepiece_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .tokenization_reformer import ReformerTokenizer

      try:
            if not is_tokenizers_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .tokenization_reformer_fast import ReformerTokenizerFast

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_reformer import (
                REFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
                ReformerAttention,
                ReformerForMaskedLM,
                ReformerForQuestionAnswering,
                ReformerForSequenceClassification,
                ReformerLayer,
                ReformerModel,
                ReformerModelWithLMHead,
                ReformerPreTrainedModel,
            )

else:
      import sys

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


