"""simple docstring"""





from __future__ import annotations


class 	UpperCAmelCase_      :


      def __init__(  self						,     a				)			->   None:
             lowercase__     :						Dict         =      order

             # a_{0} ... a_{k}
             lowercase__     :						List[Any]         =      [1.0] + [0.0] * order
             # b_{0} ... b_{k}
             lowercase__     :						List[str]         =      [1.0] + [0.0] * order

             # x[n-1] ... x[n-k]
             lowercase__     :						Dict         =      [0.0] * self.order
             # y[n-1] ... y[n-k]
             lowercase__     :						Tuple         =      [0.0] * self.order


      def 						_UpperCAmelCase			(  self						,     a						,     a				)			->   None:

             if len(a				) < self.order:
                    lowercase__     :						int         =      [1.0, *a_coeffs]

             if len(a				) != self.order + 1:
                    lowercase__     :						List[Any]         =      (
                        f"""Expected a_coeffs to have {self.order + 1} elements """
                        f"""for {self.order}-order filter, got {len(a				)}"""
                    )
                    raise ValueError(a				)

             if len(a				) != self.order + 1:
                    lowercase__     :						str         =      (
                        f"""Expected b_coeffs to have {self.order + 1} elements """
                        f"""for {self.order}-order filter, got {len(a				)}"""
                    )
                    raise ValueError(a				)

             lowercase__     :						Union[str, Any]         =      a_coeffs
             lowercase__     :						List[Any]         =      b_coeffs


      def 						_UpperCAmelCase			(  self						,     a				)			->   float:
             lowercase__     :						int         =      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]
                    )

             lowercase__     :						int         =      (result + self.b_coeffs[0] * sample) / self.a_coeffs[0]

             lowercase__     :						List[Any]         =      self.input_history[:-1]
             lowercase__     :						List[str]         =      self.output_history[:-1]

             lowercase__     :						Any         =      sample
             lowercase__     :						List[str]         =      result

             return result




from __future__ import annotations

def 			lowerCamelCase__			(       _a):
	SCREAMING_SNAKE_CASE :   Optional[Any]					  =							2
	SCREAMING_SNAKE_CASE :   Optional[int]					  =							[]
	while i * i <= n:
		if n % i:
			i += 1
		else:
			n //= i
			factors.append(_a)
	if n > 1:
		factors.append(_a)
	return factors


if __name__ == "__main__":
			import doctest

			doctest.testmod()