


'''simple docstring'''


import numpy as np






def 			__lowerCAmelCase			(__lowerCAmelCase ):
		_UpperCAmelCase		:							List[str]             =   a.shape
		_UpperCAmelCase		:							Tuple             =   min(__lowerCAmelCase   ,			__lowerCAmelCase )
		_UpperCAmelCase		:							int             =   np.eye(__lowerCAmelCase )
		_UpperCAmelCase		:							Union[str, Any]             =   a.copy()

		for k in range(t - 1 ):
				# select a column of modified matrix A':
				_UpperCAmelCase		:							Optional[Any]             =   r[k:, [k]]
				# construct first basis vector
				_UpperCAmelCase		:							Union[str, Any]             =   np.zeros_like(__lowerCAmelCase )
				_UpperCAmelCase		:							Dict             =   1.0
				# determine scaling factor
				_UpperCAmelCase		:							str             =   np.linalg.norm(__lowerCAmelCase )
				# construct vector v for Householder reflection
				_UpperCAmelCase		:							Union[str, Any]             =   x + np.sign(x[0] ) * alpha * ea
				v /= np.linalg.norm(__lowerCAmelCase )

				# construct the Householder matrix
				_UpperCAmelCase		:							str             =   np.eye(m - k ) - 2.0 * v @ v.T
				# pad with ones and zeros as necessary
				_UpperCAmelCase		:							Optional[Any]             =   np.block([[np.eye(__lowerCAmelCase ), np.zeros((k, m - k) )], [np.zeros((m - k, k) ), q_k]] )

				_UpperCAmelCase		:							Optional[int]             =   q @ q_k.T
				_UpperCAmelCase		:							Tuple             =   q_k @ r

		return q, r


if __name__ == "__main__":
						import doctest

						doctest.testmod()









from math import sqrt


def 		_lowerCamelCase					(       UpperCamelCase				)      ->		list[int]:





  """simple docstring"""





  _lowercase:			Dict      =     [1]
  for i in range(2       ,  int(sqrt(UpperCamelCase				)				) + 1       ,  1				):
    if number % i == 0:
      values.append(UpperCamelCase				)
      if int(number // i				) != i:
        values.append(int(number // i				)				)
  return sorted(UpperCamelCase				)


def 		_lowerCamelCase					(       UpperCamelCase				)      ->		bool:





  """simple docstring"""





  return sum(factors(UpperCamelCase				)				) > n


def 		_lowerCamelCase					(       UpperCamelCase				)      ->		bool:





  """simple docstring"""





  _lowercase:			Dict      =     factors(UpperCamelCase				)
  _lowercase:			int      =     len(UpperCamelCase				)
  _lowercase:			Optional[int]      =     [[0 for i in range(number + 1				)] for j in range(r + 1				)]
  for i in range(r + 1				):
    _lowercase:			List[Any]      =     True

  for i in range(1       ,  number + 1				):
    _lowercase:			Optional[int]      =     False

  for i in range(1       ,  r + 1				):
    for j in range(1       ,  number + 1				):
      if j < values[i - 1]:
        _lowercase:			Optional[int]      =     subset[i - 1][j]
      else:
        _lowercase:			Optional[Any]      =     subset[i - 1][j] or subset[i - 1][j - values[i - 1]]

  return subset[r][number] != 0


def 		_lowerCamelCase					(       UpperCamelCase				)      ->		bool:





  """simple docstring"""





  return abundant(UpperCamelCase				) and not semi_perfect(UpperCamelCase				)


if __name__ == "__main__":
   import doctest

   doctest.testmod(verbose=True)
   for number in (69, 70, 71):
      print(f'''{number} is {'' if weird(number) else 'not '}weird.''')
