class Solution {
public int countOdds(int low, int high) {
return (high + 1) / 2 - low / 2;
}
}
LeetCode 1523在区间范围内统计奇数数目(java)
最新推荐文章于 2022-04-09 20:58:01 发布
class Solution {
public int countOdds(int low, int high) {
return (high + 1) / 2 - low / 2;
}
}