Minimum positive integer value possible of X for given A and B in X = P * A + Q * B | Function to return gcd of a and b ;
def gcd ( a , b ) : NEW_LINE INDENT if a == 0 : NEW_LINE INDENT return b NEW_LINE DEDENT return gcd ( b % a , a ) NEW_LINE DEDENT / * Driver code * / NEW_LINE a = 2 NEW_LINE b = 4 NEW_LINE print ( gcd ( a , b ) ) NEW_LINE