//二叉树#includeint common(int x,int y){ if(x==y) return x; if(x>y) common(x/2,y); else common(x,y/2);}int main(){ int m,n; scanf("%d%d",&m,&n); printf("%d\n",common(m,n)); return 0;}
本文共 245 字,大约阅读时间需要 1 分钟。
//二叉树#includeint common(int x,int y){ if(x==y) return x; if(x>y) common(x/2,y); else common(x,y/2);}int main(){ int m,n; scanf("%d%d",&m,&n); printf("%d\n",common(m,n)); return 0;}
转载于:https://www.cnblogs.com/javafly/p/6037179.html