//求两个数a、b的最大公约数 function gcd(a,b){ return b===0?a:gcd(b,a%b) } 转载于:https://www.cnblogs.com/caoke/p/10512079.html