class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * 求出a、b的最大公约数。 * @param a int整型 * @param b int整型 * @return int整型 */ int gcd(int a, int b) { // write code here int count = 0; while(a%2==0&&b%2==0){ a/=2; b/=2; count++; }while(a!=b){ if(a>b){ a-=b; }else{ b-=a; } } if(...