【leetcode】1523. 在区间范围内统计奇数数目

int countOdds(int low, int high){
    return (high - low) / 2 + (low % 2 || high % 2);
}
原文地址:https://www.cnblogs.com/ganxiang/p/14029528.html