什么是最大公约数 最大公约数,也称最大公因数、最大公因子,指两个或多个整数共有约数中最大的一个。 常用求取两个数最大公约数的函数 int gcd(int a, int b) { while (b ^= a ^= b ^= a %= b); return a; }