27 18 27 % 18 = 9 27除18余9 18 % 9 = 0 18除9余0 结果9 319 377 319 % 377 = 319 377 % 319 = 58 319 % 58 = 0 结果 29
int gcd(int a,int b) { return a % b ? gcd(b, a % b) : b; }
Update your browser to view this website correctly. Update my browser now
×