LeetCode --- 1523. Count Odd Numbers in an Interval Range 解题报告

Posted 杨鑫newlfe

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了LeetCode --- 1523. Count Odd Numbers in an Interval Range 解题报告相关的知识,希望对你有一定的参考价值。

Given two non-negative integers low and high. Return the count of odd numbers between low and high (inclusive).

 

Example 1:

Input: low = 3, high = 7
Output: 3
Explanation: The odd numbers between 3 and 7 are [3,5,7].

Example 2:

Input: low = 8, high = 10
Output: 1
Explanation: The odd numbers between 8 and 10 are [9].

以上是关于LeetCode --- 1523. Count Odd Numbers in an Interval Range 解题报告的主要内容,如果未能解决你的问题,请参考以下文章

LeetCode Count Univalue Subtrees

Leetcode 之Count and Say(35)

LeetCode Count Primes

LeetCode 222. Count Complete Tree Nodes

Java [Leetcode 204]Count Primes

[leetcode-811-Subdomain Visit Count]