1523. Count Odd Numbers in an Interval Range

Обновлено: 2024-03-12
1 мин
[]

Содержание

LeetCode problem 1523

class Solution:
    def countOdds(self, low: int, high: int) -> int:
        return ((high + 1) >> 1) - (low >> 1)