最大公约数函数块

· · 个人记录

int gcd(int n,int m)
{
    if(n<m)swap(n,m);
    if(m==0) return n;
    return gcd(n%m,m);
}