



"""simple docstring"""
from __future__ import annotations

from math import ceil, floor, sqrt


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







  '''simple docstring'''


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

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

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

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

  return area


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






"""simple docstring"""
def 			_SCREAMING_SNAKE_CASE						(__lowerCAmelCase=2_81_23							) ->						Optional[Any]:







  '''simple docstring'''


  lowercase_								= [1] * (limit + 1)

  for i in range(2 ,  int(limit**0.5							) + 1							):
    sum_divs[i * i] += i
    for k in range(i + 1 ,  limit // i + 1							):
      sum_divs[k * i] += k + i

  lowercase_								= set()
  lowercase_								= 0

  for n in range(1 ,  limit + 1							):
    if sum_divs[n] > n:
      abundants.add(__lowerCAmelCase							)

    if not any((n - a in abundants) for a in abundants							):
      res += n

  return res


if __name__ == "__main__":
       print(solution())

