Place N boys and M girls in different rows such that count of persons placed in each row is maximized | Function to calculate GCD of two numbers ; Function to count maximum persons that can be placed in a row ; Driver Code ; Input ; Function to count maximum persons that can be placed in a row
def gcd ( a , b ) : NEW_LINE INDENT if ( b == 0 ) : NEW_LINE INDENT return a NEW_LINE DEDENT return gcd ( b , a % b ) NEW_LINE DEDENT def maximumRowValue ( n , m ) : NEW_LINE INDENT return gcd ( n , m ) NEW_LINE DEDENT if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT N = 4 NEW_LINE M = 2 NEW_LINE print ( maximumRowValue ( N , M ) ) NEW_LINE DEDENT