





from __future__ import annotations

from math import ceil, floor, sqrt


def 							__snake_case							(    lowerCAmelCase_ = 2_0_0_0_0_0_0	)				->						int:
    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(lowerCAmelCase_	)
        SCREAMING_SNAKE_CASE__											=			ceil(lowerCAmelCase_	)
        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() = }')



import random

class    _lowercase				:

   @staticmethod
   def     UpperCamelCase					(				lowerCamelCase__	:    str       ) ->			tuple[list[int], list[int]]:
         """simple docstring"""





         A_							       =		[ord(lowerCamelCase__       ) for i in text]
         A_							       =		[]
         A_							       =		[]
         for i in plain:
               A_							       =		random.randint(1			,						3_0_0       )
               A_							       =		(i + k) * k
               cipher.append(lowerCamelCase__       )
               key.append(lowerCamelCase__       )
         return cipher, key





   @staticmethod
   def     UpperCamelCase					(				lowerCamelCase__	:    list[int]			,						lowerCamelCase__	:    list[int]       ) ->			str:
         """simple docstring"""





         A_							       =		[]
         for i in range(len(lowerCamelCase__       )       ):
               A_							       =		int((cipher[i] - (key[i]) ** 2) / key[i]       )
               plain.append(chr(lowerCamelCase__       )       )
         return "".join(lowerCamelCase__       )


if __name__ == "__main__":
      __lowercase      ,				__lowercase				      =						Onepad().encrypt("""Hello""")
      print(c, k)
      print(Onepad().decrypt(c, k))





