!!!题目链接!!!
class Solution {
public:
int countOdds(int low, int high) {
return (high-low-high%2-low%2)/2 + high%2 + low%2;
}
};
class Solution {
public:
int countOdds(int low, int high) {
return (high-low-high%2-low%2)/2 + high%2 + low%2;
}
};