"""simple docstring"""






from __future__ import annotations

from math import ceil, floor, sqrt



def   a_						(					lowerCamelCase = 2_0_0_0_0_0_0       ):
				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(lowerCamelCase       )
								UpperCAmelCase__             =							ceil(lowerCamelCase       )
								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"""






import argparse


lowerCAmelCase__  :  List[str]						     =	'docs/source/_static/js/custom.js'



def   a_						(					lowerCamelCase       ):
				with open(lowerCamelCase					,			encoding='utf-8'					,			newline='\n'       ) as f:
								UpperCAmelCase__             =							f.readlines()
				UpperCAmelCase__             =							0

				# First let's put the right version
				while not lines[index].startswith('const stableVersion ='       ):
								index += 1
				UpperCAmelCase__             =							f'''const stableVersion = "v{version}"\n'''

				# Then update the dictionary
				while not lines[index].startswith('const versionMapping = {'       ):
								index += 1

				# We go until the end
				while not lines[index].startswith('}'       ):
								index += 1
				# We add the new version at the end
				lines[index - 1] += f'''    "v{version}": "v{version}",\n'''

				with open(lowerCamelCase					,			'w'					,			encoding='utf-8'					,			newline='\n'       ) as f:
								f.writelines(lowerCamelCase       )


if __name__ == "__main__":
						lowerCAmelCase__  :  List[Any]						     =	argparse.ArgumentParser()
						parser.add_argument('--version', help='Release version.')
						lowerCAmelCase__  :  Optional[int]						     =	parser.parse_args()
						update_custom_js(args.version)



