https://leetcode.com/problems/count-odd-numbers-in-an-interval-range/description/ Easy

Решение

class Solution {
    fun countOdds(low: Int, high: Int): Int {
        return (high + 1) / 2 - low / 2
    }
}