"""simple docstring"""






import math
import sys



def   a_						(					lowerCamelCase       ):
				if number != int(lowerCamelCase       ):
								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
				UpperCAmelCase__             =							[-1] * (number + 1)
				UpperCAmelCase__             =							0
				for i in range(1					,			number + 1       ):
								UpperCAmelCase__             =							sys.maxsize
								UpperCAmelCase__             =							int(math.sqrt(lowerCamelCase       )       )
								for j in range(1					,			root + 1       ):
												UpperCAmelCase__             =							1 + answers[i - (j**2)]
												UpperCAmelCase__             =							min(lowerCamelCase					,			lowerCamelCase       )
								UpperCAmelCase__             =							answer
				return answers[number]


if __name__ == "__main__":
						import doctest

						doctest.testmod()




"""simple docstring"""






import math



def   a_						(					lowerCamelCase					,			lowerCamelCase       ):
				if (
				    not isinstance(lowerCamelCase					,			(int, float)       )
				    or power_factor < -1
				    or power_factor > 1
				):
								raise ValueError('power_factor must be a valid float value between -1 and 1.'       )
				return apparent_power * power_factor



def   a_						(					lowerCamelCase					,			lowerCamelCase       ):
				if (
				    not isinstance(lowerCamelCase					,			(int, float)       )
				    or power_factor < -1
				    or power_factor > 1
				):
								raise ValueError('power_factor must be a valid float value between -1 and 1.'       )
				return apparent_power * math.sqrt(1 - power_factor**2       )


if __name__ == "__main__":
						import doctest

						doctest.testmod()



