Pair of integers with difference K having an element as the K | Function to find the required pair ; No pair possible ; Driver Code
def computePair ( K ) : NEW_LINE INDENT if ( K == 1 ) : NEW_LINE INDENT print ( " No " ) NEW_LINE return NEW_LINE DEDENT else : NEW_LINE INDENT print ( K * K / ( K - 1 ) , end = " ▁ " ) NEW_LINE print ( K / ( K - 1 ) ) NEW_LINE DEDENT DEDENT if __name__ == " _ _ main _ _ " : NEW_LINE INDENT K = 6 NEW_LINE computePair ( K ) NEW_LINE DEDENT