【leetcode】面试题 05.06. 整数转换 int convertInteger(int A, int B){ A^=B; int ret=0; for(int i=0;i<32;i++){ if((A>>i)&1==1){ ret++; } } return ret; }