public class Solution {
public int rangeBitwiseAnd(int m, int n) {
int r=Integer.MAX_VALUE;
while((m&r)!=(n&r)) r=r<<1;
return n&r;
}
}
转载于:https://www.cnblogs.com/asuran/p/7760977.html
2024-03-31 19:05:52
public class Solution {
public int rangeBitwiseAnd(int m, int n) {
int r=Integer.MAX_VALUE;
while((m&r)!=(n&r)) r=r<<1;
return n&r;
}
}
转载于:https://www.cnblogs.com/asuran/p/7760977.html