



'''simple docstring'''
import math






def A__   (					UpperCAmelCase_							):
						_UpperCamelCase :		str			    =       math.loga(math.sqrt(4 * positive_integer + 1							) / 2 + 1 / 2							)

						return exponent == int(UpperCAmelCase_							)






def A__   (					UpperCAmelCase_ = 1 / 1_2_3_4_5							):
						_UpperCamelCase :		Tuple			    =       0
						_UpperCamelCase :		Optional[Any]			    =       0

						_UpperCamelCase :		int			    =       3
						while True:
												_UpperCamelCase :		List[str]			    =       (integer**2 - 1) / 4
												# if candidate is an integer, then there is a partition for k
												if partition_candidate == int(UpperCAmelCase_							):
																		_UpperCamelCase :		Any			    =       int(UpperCAmelCase_							)
																		total_partitions += 1
																		if check_partition_perfect(UpperCAmelCase_							):
																								perfect_partitions += 1
												if perfect_partitions > 0:
																		if perfect_partitions / total_partitions < max_proportion:
																								return int(UpperCAmelCase_							)
												integer += 1


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







'''simple docstring'''
from __future__ import annotations

import numpy as np






def A__   (					UpperCAmelCase_							):
						_UpperCamelCase    ,      _UpperCamelCase :		Optional[int]			    =       np.shape(UpperCAmelCase_							)
						if rows != columns:
												_UpperCamelCase :		Union[str, Any]			    =       (
												    '\'table\' has to be of square shaped array but got a '
												    f'{rows}x{columns} array:\n{table}'
												)
												raise ValueError(UpperCAmelCase_							)

						_UpperCamelCase :		Optional[Any]			    =       np.zeros((rows, columns)							)
						_UpperCamelCase :		Tuple			    =       np.zeros((rows, columns)							)
						for i in range(UpperCAmelCase_							):
												for j in range(UpperCAmelCase_							):
																		_UpperCamelCase :		Optional[Any]			    =       sum(lower[i][k] * upper[k][j] for k in range(UpperCAmelCase_							)							)
																		if upper[j][j] == 0:
																								raise ArithmeticError('No LU decomposition exists'							)
																		_UpperCamelCase :		Optional[Any]			    =       (table[i][j] - total) / upper[j][j]
												_UpperCamelCase :		int			    =       1
												for j in range(UpperCAmelCase_  ,  UpperCAmelCase_							):
																		_UpperCamelCase :		Optional[int]			    =       sum(lower[i][k] * upper[k][j] for k in range(UpperCAmelCase_							)							)
																		_UpperCamelCase :		Tuple			    =       table[i][j] - total
						return lower, upper


if __name__ == "__main__":
					import doctest

					doctest.testmod()


