def gcd_looping_with_divrem(m, n):
    """
    Computes the greatest common divisor of two numbers by getting remainder from division in a
    loop.

    :param int m: First number.
    :param int n: Second number.

    :returns: GCD as a number.
    """
    while n != 0:
        m, n = n, m % n
    return m