





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() = }')








'''simple docstring'''







def       __UpperCamelCase					(      lowercase_       :  list[int]   ,       lowercase_       :  list[int]   ,       lowercase_       :  int   ):
       """simple docstring"""




       return not any(
           neighbour == 1 and colored_vertices[i] == color
           for i, neighbour in enumerate(lowercase_   )   )


def       __UpperCamelCase					(      lowercase_       :  list[list[int]]   ,       lowercase_       :  int   ,       lowercase_       :  list[int]   ,       lowercase_       :  int   ):
       """simple docstring"""




       if index == len(lowercase_   ):
              return True

       # Recursive Step
       for i in range(lowercase_   ):
              if valid_coloring(graph[index]   ,       lowercase_   ,       lowercase_   ):
                     # Color current vertex
                     a_						     =			i
                     # Validate coloring
                     if util_color(lowercase_   ,       lowercase_   ,       lowercase_   ,       index + 1   ):
                            return True
                     # Backtrack
                     a_						     =			-1
       return False


def       __UpperCamelCase					(      lowercase_       :  list[list[int]]   ,       lowercase_       :  int   ):
       """simple docstring"""




       a_						     =			[-1] * len(lowercase_   )

       if util_color(lowercase_   ,       lowercase_   ,       lowercase_   ,       0   ):
              return colored_vertices

       return []




