


from __future__ import annotations






class      UpperCamelCase					:


   '''simple docstring'''







   def __init__(     self   ,							UpperCamelCase_		):
        lowercase_       :Tuple     =       order

        # a_{0} ... a_{k}
        lowercase_       :Any     =       [1.0] + [0.0] * order
        # b_{0} ... b_{k}
        lowercase_       :Optional[Any]     =       [1.0] + [0.0] * order

        # x[n-1] ... x[n-k]
        lowercase_       :int     =       [0.0] * self.order
        # y[n-1] ... y[n-k]
        lowercase_       :Any     =       [0.0] * self.order
   def 		UpperCamelCase  (     self   ,							UpperCamelCase_   ,							UpperCamelCase_		):
        if len(UpperCamelCase_		) < self.order:
             lowercase_       :Union[str, Any]     =       [1.0, *a_coeffs]

        if len(UpperCamelCase_		) != self.order + 1:
             lowercase_       :Tuple     =       (
                 f"Expected a_coeffs to have {self.order + 1} elements "
                 f"for {self.order}-order filter, got {len(UpperCamelCase_		)}"
             )
             raise ValueError(UpperCamelCase_		)

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

        lowercase_       :Optional[int]     =       a_coeffs
        lowercase_       :Optional[Any]     =       b_coeffs




   def 		UpperCamelCase  (     self   ,							UpperCamelCase_		):
        lowercase_       :Tuple     =       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_       :Dict     =       self.input_history[:-1]
        lowercase_       :Optional[Any]     =       self.output_history[:-1]

        lowercase_       :int     =       sample
        lowercase_       :str     =       result

        return result





import math

SCREAMING_SNAKE_CASE       :		List[str]         =				10
SCREAMING_SNAKE_CASE       :		Dict         =				7
SCREAMING_SNAKE_CASE       :		int         =				BALLS_PER_COLOUR * NUM_COLOURS




def     UpperCamelCase    (      _a = 2_0		)					->							str:
     '''simple docstring'''





     lowercase_       :List[str]     =       math.comb(_a       ,		_a		)
     lowercase_       :Tuple     =       math.comb(NUM_BALLS - BALLS_PER_COLOUR       ,		_a		)

     lowercase_       :Dict     =       NUM_COLOURS * (1 - missing_colour / total)

     return f"{result:.9f}"


if __name__ == "__main__":
   print(solution(20))

