

"""simple docstring"""


def     a__    (    __SCREAMING_SNAKE_CASE = 1_0_0_0_0_0_0 )	->	int:
		__lowerCAmelCase:       Optional[Any]          =			limit + 1
		__lowerCAmelCase:       Optional[Any]          =			[0] * limit
		for first_term in range(1					, __SCREAMING_SNAKE_CASE ):
				for n in range(__SCREAMING_SNAKE_CASE					, __SCREAMING_SNAKE_CASE					, __SCREAMING_SNAKE_CASE ):
						__lowerCAmelCase:       Optional[Any]          =			first_term + n / first_term
						if common_difference % 4:  # d must be divisble by 4
								continue
						else:
								common_difference /= 4
								if (
								    first_term > common_difference
								    and first_term < 4 * common_difference
								):  # since x,y,z are positive integers
										frequency[n] += 1  # so z>0 and a>d ,also 4d<a

		__lowerCAmelCase:       List[Any]          =			sum(1 for x in frequency[1:limit] if x == 1_0 )

		return count


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





"""simple docstring"""


from __future__ import annotations






def     a__    (    __SCREAMING_SNAKE_CASE )	->	bool:
		__lowerCAmelCase:       Tuple          =			str(__SCREAMING_SNAKE_CASE )
		return len(__SCREAMING_SNAKE_CASE ) == 9 and set(__SCREAMING_SNAKE_CASE ) == set("123456789" )






def     a__    (    )	->	int | None:
		for base_num in range(9_9_9_9					, 4_9_9_9					, -1 ):
				__lowerCAmelCase:       Tuple          =			1_0_0_0_0_2 * base_num
				if is_9_pandigital(__SCREAMING_SNAKE_CASE ):
						return candidate

		for base_num in range(3_3_3					, 9_9					, -1 ):
				__lowerCAmelCase:       int          =			1_0_0_2_0_0_3 * base_num
				if is_9_pandigital(__SCREAMING_SNAKE_CASE ):
						return candidate

		return None


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


