
import unittest

import numpy as np


def     __lowerCAmelCase			(			a__						,    a__						,    a__						,    a__ = None						,    )       ->  np.ndarray:
				__a										=    np.shape(a__  )
				__a										=    np.shape(a__  )
				__a										=    np.shape(a__  )

				if shape_a[0] != shape_b[0]:
								__a										=    (
								    '''Expected the same number of rows for A and B. '''
								    F"""Instead found A of size {shape_a} and B of size {shape_b}"""
								)
								raise ValueError(a__  )

				if shape_b[1] != shape_c[1]:
								__a										=    (
								    '''Expected the same number of columns for B and C. '''
								    F"""Instead found B of size {shape_b} and C of size {shape_c}"""
								)
								raise ValueError(a__  )

				__a										=    pseudo_inv
				if a_inv is None:
								try:
												__a										=    np.linalg.inv(a__  )
								except np.linalg.LinAlgError:
												raise ValueError(
												    '''Input matrix A is not invertible. Cannot compute Schur complement.'''  )

				return mat_c - mat_b.T @ a_inv @ mat_b







class 			__A( unittest.TestCase			):




				def 				SCREAMING_SNAKE_CASE_		(     self				)    ->      None:


								'''simple docstring'''




								__a										=    np.array([[1, 2, 1], [2, 1, 2], [3, 2, 4]]				)
								__a										=    np.array([[0, 3], [3, 0], [2, 3]]				)
								__a										=    np.array([[2, 1], [6, 3]]				)

								__a										=    schur_complement(_snake_case		,     _snake_case		,     _snake_case				)

								__a										=    np.block([[a, b], [b.T, c]]				)

								__a										=    np.linalg.det(_snake_case				)
								__a										=    np.linalg.det(_snake_case				)
								__a										=    np.linalg.det(_snake_case				)

								self.assertAlmostEqual(_snake_case		,     det_a * det_s				)




				def 				SCREAMING_SNAKE_CASE_		(     self				)    ->      None:


								'''simple docstring'''




								__a										=    np.array([[1, 2, 1], [2, 1, 2], [3, 2, 4]]				)
								__a										=    np.array([[0, 3], [3, 0], [2, 3]]				)
								__a										=    np.array([[2, 1], [6, 3]]				)

								with self.assertRaises(_snake_case				):
												schur_complement(_snake_case		,     _snake_case		,     _snake_case				)




				def 				SCREAMING_SNAKE_CASE_		(     self				)    ->      None:


								'''simple docstring'''




								__a										=    np.array([[1, 2, 1], [2, 1, 2], [3, 2, 4]]				)
								__a										=    np.array([[0, 3], [3, 0], [2, 3]]				)
								__a										=    np.array([[2, 1, 3], [6, 3, 5]]				)

								with self.assertRaises(_snake_case				):
												schur_complement(_snake_case		,     _snake_case		,     _snake_case				)


if __name__ == "__main__":
					import doctest

					doctest.testmod()
					unittest.main()

from __future__ import annotations

import typing
from collections import Counter


def     __lowerCAmelCase			(			a__  )       ->  typing.Counter[int]:
				__a										=    Counter()
				for base in range(1						,    max_perimeter + 1  ):
								for perpendicular in range(a__						,    max_perimeter + 1  ):
												__a										=    (base * base + perpendicular * perpendicular) ** 0.5
												if hypotenuse == int(a__  ):
																__a										=    int(base + perpendicular + hypotenuse  )
																if perimeter > max_perimeter:
																				continue
																triplets[perimeter] += 1
				return triplets


def     __lowerCAmelCase			(			a__ = 1000  )       ->  int:
				__a										=    pythagorean_triple(a__  )
				return triplets.most_common(1  )[0][0]


if __name__ == "__main__":
					print(F"Perimeter {solution()} has maximum solutions")