


"""simple docstring"""
import doctest
from collections import deque

import numpy as np





class        __A       :





							'''simple docstring'''

							def __init__(			self							: str    )   ->None:



														"""simple docstring"""



														snake_case_          =						[2, 1, 2, -1]
														snake_case_          =						[1, 2, 3, 4]



							def 						lowerCAmelCase    (			self							: Dict    )   ->list[float]:



														"""simple docstring"""



														snake_case_          =						len(self.first_signal    )
														snake_case_          =						len(self.second_signal    )

														snake_case_          =						max(UpperCAmelCase_						,    UpperCAmelCase_    )

														# create a zero matrix of max_length x max_length
														snake_case_          =						[[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_    ):
																					snake_case_          =						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
														snake_case_          =						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"""
from collections import defaultdict
from math import gcd







def   _a			( _SCREAMING_SNAKE_CASE = 1_500_000			)      ->			int:
							snake_case_          =						defaultdict(_SCREAMING_SNAKE_CASE			)
							snake_case_          =						2
							while 2 * euclid_m * (euclid_m + 1) <= limit:
														for euclid_n in range((euclid_m % 2) + 1			,	_SCREAMING_SNAKE_CASE			,	2			):
																					if gcd(_SCREAMING_SNAKE_CASE			,	_SCREAMING_SNAKE_CASE			) > 1:
																												continue
																					snake_case_          =						2 * euclid_m * (euclid_m + euclid_n)
																					for perimeter in range(_SCREAMING_SNAKE_CASE			,	limit + 1			,	_SCREAMING_SNAKE_CASE			):
																												frequencies[perimeter] += 1
														euclid_m += 1
							return sum(1 for frequency in frequencies.values() if frequency == 1			)


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



