题解 | #最大公约数#
最大公约数
http://www.nowcoder.com/practice/cf4091ca75ca47958182dae85369c82c
int gcd(int a, int b ) {
// write code here
int c = 1;
while (c=a%b)
{
a = b;
b = c;
}
return b;
}
// write code here
int c = 1;
while (c=a%b)
{
a = b;
b = c;
}
return b;
}