






"""simple docstring"""

import sys






def _lowerCAmelCase	(  __lowerCamelCase:Tuple   ):

						'''simple docstring'''






						__magic_name__            =     len(__lowerCamelCase   )
						__magic_name__            =     [[0 for x in range(__lowerCamelCase   )] for x in range(__lowerCamelCase   )]
						__magic_name__            =     [[0 for x in range(__lowerCamelCase   )] for x in range(__lowerCamelCase   )]

						for chain_length in range(2 ,						__lowerCamelCase   ):
												for a in range(1 ,						n - chain_length + 1   ):
																		__magic_name__            =     a + chain_length - 1

																		__magic_name__            =     sys.maxsize
																		for c in range(__lowerCamelCase ,						__lowerCamelCase   ):
																								__magic_name__            =     (
																								    matrix[a][c] + matrix[c + 1][b] + array[a - 1] * array[c] * array[b]
																								)
																								if cost < matrix[a][b]:
																														__magic_name__            =     cost
																														__magic_name__            =     c
						return matrix, sol






def _lowerCAmelCase	(  __lowerCamelCase:Dict ,						__lowerCamelCase:Optional[Any] ,						__lowerCamelCase:Optional[Any]   ):

						'''simple docstring'''






						if i == j:
												print("A" + str(__lowerCamelCase   ) ,						end=" "   )
						else:
												print("(" ,						end=" "   )
												print_optiomal_solution(__lowerCamelCase ,						__lowerCamelCase ,						optimal_solution[i][j]   )
												print_optiomal_solution(__lowerCamelCase ,						optimal_solution[i][j] + 1 ,						__lowerCamelCase   )
												print(")" ,						end=" "   )






def _lowerCAmelCase	(  ):

						'''simple docstring'''






						__magic_name__            =     [3_0, 3_5, 1_5, 5, 1_0, 2_0, 2_5]
						__magic_name__            =     len(__lowerCamelCase   )
						# Size of matrix created from above array will be
						# 30*35 35*15 15*5 5*10 10*20 20*25
						__magic_name__      ,    __magic_name__            =     matrix_chain_order(__lowerCamelCase   )

						print("No. of Operation required: " + str(matrix[1][n - 1]   )   )
						print_optiomal_solution(__lowerCamelCase ,						1 ,						n - 1   )


if __name__ == "__main__":
			main()











"""simple docstring"""

def _lowerCAmelCase	(  __lowerCamelCase:int   ):

						'''simple docstring'''






						__magic_name__            =     n ** (1 / 3)
						return (val * val * val) == n


if __name__ == "__main__":
			print(perfect_cube(27))
			print(perfect_cube(4))



