

"""simple docstring"""


import doctest
from collections import deque

import numpy as np





class    snake_case     :

				def __init__(     self							:    List[Any])->       None:



						'''simple docstring'''


						__lowerCAmelCase:	List[str]   				=      [2, 1, 2, -1]
						__lowerCAmelCase:	int   				=      [1, 2, 3, 4]




				def 							lowercase_					(     self							:    Optional[int])->       list[float]:



						'''simple docstring'''


						__lowerCAmelCase:	Dict   				=      len(self.first_signal)
						__lowerCAmelCase:	int   				=      len(self.second_signal)

						__lowerCAmelCase:	int   				=      max(UpperCamelCase__					,  UpperCamelCase__)

						# create a zero matrix of max_length x max_length
						__lowerCAmelCase:	Dict   				=      [[0] * max_length for i in range(UpperCamelCase__)]

						# fills the smaller signal with zeros to make both signals of same length
						if length_first_signal < length_second_signal:
								self.first_signal += [0] * (max_length - length_first_signal)
						elif length_first_signal > length_second_signal:
								self.second_signal += [0] * (max_length - length_second_signal)
						for i in range(UpperCamelCase__):
								__lowerCAmelCase:	Optional[int]   				=      deque(self.second_signal)
								rotated_signal.rotate(UpperCamelCase__)
								for j, item in enumerate(UpperCamelCase__):
										matrix[i][j] += item

        # multiply the matrix with the first signal
						__lowerCAmelCase:	Any   				=      np.matmul(np.transpose(UpperCamelCase__)					,  np.transpose(self.first_signal))

						# rounding-off to two decimal places
						return [round(UpperCamelCase__					,  2) for i in final_signal]


if __name__ == "__main__":
			doctest.testmod()





"""simple docstring"""


import math
import sys






def    a__   (   __SCREAMING_SNAKE_CASE			)     ->     int:
		if number != int(__SCREAMING_SNAKE_CASE			):
				raise ValueError("the value of input must be a natural number"			)
		if number < 0:
				raise ValueError("the value of input must not be a negative number"			)
		if number == 0:
				return 1
		__lowerCAmelCase:	int   				=      [-1] * (number + 1)
		__lowerCAmelCase:	Optional[Any]   				=      0
		for i in range(1 ,			number + 1			):
				__lowerCAmelCase:	List[str]   				=      sys.maxsize
				__lowerCAmelCase:	int   				=      int(math.sqrt(__SCREAMING_SNAKE_CASE			)			)
				for j in range(1 ,			root + 1			):
						__lowerCAmelCase:	Optional[Any]   				=      1 + answers[i - (j**2)]
						__lowerCAmelCase:	List[Any]   				=      min(__SCREAMING_SNAKE_CASE ,			__SCREAMING_SNAKE_CASE			)
				__lowerCAmelCase:	Optional[Any]   				=      answer
		return answers[number]


if __name__ == "__main__":
			import doctest

			doctest.testmod()


