


'''simple docstring'''





from __future__ import annotations
class 						a__					:





			'''simple docstring'''

			def __init__(  self							:			Union[str, Any]			,    lowerCAmelCase_							:			int	)      ->		None:
						__A=	order

						# a_{0} ... a_{k}
						__A=	[1.0] + [0.0] * order
						# b_{0} ... b_{k}
						__A=	[1.0] + [0.0] * order

						# x[n-1] ... x[n-k]
						__A=	[0.0] * self.order
						# y[n-1] ... y[n-k]
						__A=	[0.0] * self.order
			def 					lowerCAmelCase     (  self							:			Tuple			,    lowerCAmelCase_							:			list[float]			,    lowerCAmelCase_							:			list[float]	)      ->		None:
						if len(lowerCAmelCase_	) < self.order:
									__A=	[1.0, *a_coeffs]

						if len(lowerCAmelCase_	) != self.order + 1:
									__A=	(
									    F"""Expected a_coeffs to have {self.order + 1} elements """
									    F"""for {self.order}-order filter, got {len(lowerCAmelCase_	)}"""
									)
									raise ValueError(lowerCAmelCase_	)

						if len(lowerCAmelCase_	) != self.order + 1:
									__A=	(
									    F"""Expected b_coeffs to have {self.order + 1} elements """
									    F"""for {self.order}-order filter, got {len(lowerCAmelCase_	)}"""
									)
									raise ValueError(lowerCAmelCase_	)

						__A=	a_coeffs
						__A=	b_coeffs

			def 					lowerCAmelCase     (  self							:			str			,    lowerCAmelCase_							:			float	)      ->		float:
						__A=	0.0

						# Start at index 1 and do index 0 at the end.
						for i in range(1			,    self.order + 1	):
									result += (
									    self.b_coeffs[i] * self.input_history[i - 1]
									    - self.a_coeffs[i] * self.output_history[i - 1]
									)

						__A=	(result + self.b_coeffs[0] * sample) / self.a_coeffs[0]

						__A=	self.input_history[:-1]
						__A=	self.output_history[:-1]

						__A=	sample
						__A=	result

						return result







'''simple docstring'''





from __future__ import annotations

from functools import lru_cache
from math import ceil

UpperCAmelCase__  			=				1_0_0

UpperCAmelCase__  			=				set(range(3, NUM_PRIMES, 2))
primes.add(2)
UpperCAmelCase__  			=				42

for prime in range(3, ceil(NUM_PRIMES**0.5), 2):
					if prime not in primes:
										continue
					primes.difference_update(set(range(prime * prime, NUM_PRIMES, prime)))






@lru_cache(maxsize=100 )
def 						UpperCAmelCase__(				_SCREAMING_SNAKE_CASE					: int ):






			"""simple docstring"""




			if number_to_partition < 0:
						return set()
			elif number_to_partition == 0:
						return {1}

			__A=	set()
			__A=	42
			__A=	42

			for prime in primes:
						if prime > number_to_partition:
									continue
						for sub in partition(number_to_partition - prime ):
									ret.add(sub * prime )

			return ret






def 						UpperCAmelCase__(				_SCREAMING_SNAKE_CASE					: int = 5000 ):






			"""simple docstring"""




			for number_to_partition in range(1,_SCREAMING_SNAKE_CASE ):
						if len(partition(_SCREAMING_SNAKE_CASE ) ) > number_unique_partitions:
									return number_to_partition
			return None


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



