寻找二叉树上两个节点的最近公共祖先
int LCA(int a, int b){
int A = a, B = b;
while(A != 0){
int x = B;
while(x > 0){
if(x == A) return x;
if(x % 2 == 0) x /= 2;
else x = (x - 1) / 2;
}
if(A % 2 == 0) A /= 2;
else A = (A - 1) / 2;
}
return 0;
}