
"""simple docstring"""

def 		UpperCAmelCase (		a_      ):





		'''simple docstring'''


		lowerCamelCase					:      Optional[int]          =   current_set.copy()
		for row_index, row in enumerate(a_      ):
				lowerCamelCase					:      Optional[int]          =   row[0]
				for column_index, column in enumerate(a_      ):
						if magnitude == 0:
								lowerCamelCase					:      Tuple          =   column
								continue
						lowerCamelCase					:      Dict          =   column / magnitude
    # Subtract to cancel term
		lowerCamelCase					:      Dict          =   current_set[0]
		lowerCamelCase					:      Union[str, Any]          =   [first_row]
		lowerCamelCase					:      Dict          =   current_set[1::]
		for row in current_set:
				lowerCamelCase					:      Optional[int]          =   []
				# If first term is 0, it is already in form we want, so we preserve it
				if row[0] == 0:
						final_set.append(a_      )
						continue
				for column_index in range(len(a_      )      ):
						temp_row.append(first_row[column_index] - row[column_index]      )
				final_set.append(a_      )
		# Create next recursion iteration set
		if len(final_set[0]      ) != 3:
				lowerCamelCase					:      List[Any]          =   final_set[0]
				lowerCamelCase					:      Dict          =   []
				lowerCamelCase					:      List[str]          =   []
				for row in final_set[1::]:
						current_first_column.append(row[0]      )
						next_iteration.append(row[1::]      )
				lowerCamelCase					:      Dict          =   simplify(a_      )
				for i in range(len(a_      )      ):
						resultant[i].insert(0,						current_first_column[i]      )
				resultant.insert(0,						a_      )
				lowerCamelCase					:      Tuple          =   resultant
		return final_set
def 		UpperCAmelCase (		a_      ):





		'''simple docstring'''


		if len(a_      ) == 0:
				raise IndexError('solve_simultaneous() requires n lists of length n+1'      )
		lowerCamelCase					:      Optional[Any]          =   len(a_      ) + 1
		if any(len(a_      ) != _length for item in equations      ):
				raise IndexError('solve_simultaneous() requires n lists of length n+1'      )
		for row in equations:
				if any(not isinstance(a_,						(int, float)      ) for column in row      ):
						raise ValueError('solve_simultaneous() requires lists of integers'      )
		if len(a_      ) == 1:
				return [equations[0][-1] / equations[0][0]]
		lowerCamelCase					:      List[str]          =   equations.copy()
		if any(0 in row for row in data_set      ):
				lowerCamelCase					:      Any          =   data_set.copy()
				lowerCamelCase					:      str          =   []
				for row_index, row in enumerate(a_      ):
						if 0 not in row:
								lowerCamelCase					:      int          =   data_set.pop(a_      )
								break
				if not full_row:
						raise ValueError('solve_simultaneous() requires at least 1 full equation'      )
				data_set.insert(0,						a_      )
		lowerCamelCase					:      Optional[int]          =   data_set.copy()
		lowerCamelCase					:      Optional[Any]          =   simplify(a_      )
		lowerCamelCase					:      List[str]          =   simplified[::-1]
		lowerCamelCase					:      list          =   []
		for row in simplified:
				lowerCamelCase					:      List[str]          =   row[-1]
				if not solutions:
						if row[-2] == 0:
								solutions.append(0      )
								continue
						solutions.append(current_solution / row[-2]      )
						continue
				lowerCamelCase					:      Optional[Any]          =   row.copy()[: len(a_      ) - 1 :]
				while temp_row[0] == 0:
						temp_row.pop(0      )
				if len(a_      ) == 0:
						solutions.append(0      )
						continue
				lowerCamelCase					:      Union[str, Any]          =   temp_row[1::]
				lowerCamelCase					:      List[Any]          =   temp_row[::-1]
				for column_index, column in enumerate(a_      ):
						current_solution -= column * solutions[column_index]
				solutions.append(a_      )
		lowerCamelCase					:      Dict          =   []
		for item in solutions:
				final.append(float(round(a_,						5      )      )      )
		return final[::-1]


if __name__ == "__main__":
					import doctest

					doctest.testmod()
					_A						=			[
					    [2, 1, 1, 1, 1, 4],
					    [1, 2, 1, 1, 1, 5],
					    [1, 1, 2, 1, 1, 6],
					    [1, 1, 1, 2, 1, 7],
					    [1, 1, 1, 1, 2, 8],
					]
					print(solve_simultaneous(eq))
					print(solve_simultaneous([[4, 2]]))








"""simple docstring"""

def 		UpperCAmelCase (		a_ = 1000      ):





		'''simple docstring'''


		lowerCamelCase					:      Dict          =   2**power
		lowerCamelCase					:      List[str]          =   str(a_      )
		lowerCamelCase					:      Dict          =   list(a_      )
		lowerCamelCase					:      Optional[Any]          =   0

		for i in list_num:
				sum_of_num += int(a_      )

		return sum_of_num


if __name__ == "__main__":
					_A						=			int(input('Enter the power of 2: ').strip())
					print('2 ^ ', power, ' = ', 2**power)
					_A						=			solution(power)
					print('Sum of the digits is: ', result)






