Check if a number can be represented as product of two positive perfect cubes | Function to check if the number N can be represented as the product of two perfect cubes or not ; If cube of cube_root is N ; Otherwise , prNo ; Driver Code
def productOfTwoPerfectCubes ( N ) : NEW_LINE INDENT cube_root = round ( ( N ) ** ( 1 / 3 ) ) NEW_LINE print ( cube_root ) NEW_LINE if ( cube_root * cube_root * cube_root == N ) : NEW_LINE INDENT print ( " Yes " ) NEW_LINE return NEW_LINE DEDENT else : NEW_LINE INDENT print ( " No " ) NEW_LINE return NEW_LINE DEDENT DEDENT if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT N = 216 NEW_LINE productOfTwoPerfectCubes ( N ) NEW_LINE DEDENT