Idoneal Numbers | Function to check if number is an Idoneal numbers ; Iterate for all triples pairs ( a , b , c ) ; If the condition is satisfied ; Driver Code ; Function call
def isIdoneal ( n ) : NEW_LINE INDENT for a in range ( 1 , n + 1 ) : NEW_LINE INDENT for b in range ( a + 1 , n + 1 ) : NEW_LINE INDENT for c in range ( b + 1 , n + 1 ) : NEW_LINE INDENT if ( a * b + b * c + c * a == n ) : NEW_LINE INDENT return False NEW_LINE DEDENT DEDENT DEDENT DEDENT return True NEW_LINE DEDENT N = 10 NEW_LINE if ( isIdoneal ( N ) ) : NEW_LINE INDENT print ( " Yes " ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( " No " ) NEW_LINE DEDENT