

'''simple docstring'''


def     SCREAMING_SNAKE_CASE(	UpperCamelCase = 9_9_8_0_0_1	)     ->     int:

	# fetches the next number
	for number in range(n - 1 ,9_9_9_9 ,-1	):
		UpperCAmelCase_		:   Optional[int]													=       str(UpperCamelCase	)

		# checks whether 'str_number' is a palindrome.
		if str_number == str_number[::-1]:
			UpperCAmelCase_		:   Dict													=       9_9_9

			# if 'number' is a product of two 3-digit numbers
			# then number is the answer otherwise fetch next number.
			while divisor != 9_9:
				if (number % divisor == 0) and (len(str(number // divisor	)	) == 3.0):
					return number
				divisor -= 1
	raise ValueError('That number is larger than our acceptable range.'	)


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









'''simple docstring'''


from itertools import combinations, product







def     SCREAMING_SNAKE_CASE(	UpperCamelCase ,UpperCamelCase ,UpperCamelCase ,UpperCamelCase	)     ->     bool:
	if xa == ya == 0 or xa == ya == 0:
		return False
	UpperCAmelCase_		:   int													=       xa * xa + ya * ya
	UpperCAmelCase_		:   List[str]													=       xa * xa + ya * ya
	UpperCAmelCase_		:   Optional[Any]													=       (xa - xa) * (xa - xa) + (ya - ya) * (ya - ya)
	return (
	    a_square + b_square == c_square
	    or a_square + c_square == b_square
	    or b_square + c_square == a_square
	)







def     SCREAMING_SNAKE_CASE(	UpperCamelCase = 5_0	)     ->     int:
	return sum(
	    1
	    for pta, pta in combinations(product(range(limit + 1	) ,repeat=2	) ,2	)
	    if is_right(*UpperCamelCase ,*UpperCamelCase	)	)


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






