

import math





def a(lowercase__						):





	'''simple docstring'''
	snake_case_   		=			math.loga(math.sqrt(4 * positive_integer + 1						) / 2 + 1 / 2						)

	return exponent == int(lowercase__						)





def a(lowercase__ = 1 / 12345						):





	'''simple docstring'''
	snake_case_   		=			0
	snake_case_   		=			0

	snake_case_   		=			3
	while True:
		snake_case_   		=			(integer**2 - 1) / 4
		# if candidate is an integer, then there is a partition for k
		if partition_candidate == int(lowercase__						):
			snake_case_   		=			int(lowercase__						)
			total_partitions += 1
			if check_partition_perfect(lowercase__						):
				perfect_partitions += 1
		if perfect_partitions > 0:
			if perfect_partitions / total_partitions < max_proportion:
				return int(lowercase__						)
		integer += 1


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



import functools





def a(lowercase__      ,			lowercase__						):





	'''simple docstring'''

	# Validation
	if not isinstance(lowercase__      ,			lowercase__						) or not all(isinstance(lowercase__      ,			lowercase__						) for day in days						):
		raise ValueError('The parameter days should be a list of integers'						)

	if len(lowercase__						) != 3 or not all(isinstance(lowercase__      ,			lowercase__						) for cost in costs						):
		raise ValueError('The parameter costs should be a list of three integers'						)

	if len(lowercase__						) == 0:
		return 0

	if min(lowercase__						) <= 0:
		raise ValueError('All days elements should be greater than 0'						)

	if max(lowercase__						) >= 366:
		raise ValueError('All days elements should be less than 366'						)

	snake_case_   		=			set(lowercase__						)

	@functools.cache
	def dynamic_programming(lowercase__						) -> int:
		if index > 365:
			return 0

		if index not in days_set:
			return dynamic_programming(index + 1						)

		return min(
		    costs[0] + dynamic_programming(index + 1						)      ,			costs[1] + dynamic_programming(index + 7						)      ,			costs[2] + dynamic_programming(index + 30						)      ,			)

	return dynamic_programming(1						)


if __name__ == "__main__":
		import doctest

		doctest.testmod()
