//解法一:更相减损法
BigInt(BigInt x,BigInt y){
if(x < y){
return gcd(y,x);
}
if(y==0) return x;
else return gcd(x-y,y);//gcd(y-x,y)
}
//解法二:辗转相除法
int gcd(int x, int y){
return !b ? a:gcd(b,a%b);
}
//解法三:解法一和解法二的集合
BigInt gcd(BigInt x,BigInt y){
if(x < y) return gcd(y,x);
if(y==0) return x;
else{
if(IsEven(x)){
if(IsEven(y)) return 2*gcd(x>>1,y>>1);
else return gcd(x>>1,y);
}
else{
if(IsEven(y)) return gcd(x,y>>1);
else return gcd(y,x-y);
}
}
}