1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-10 18:48:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/在区间范围内统计奇数数目 [count-odd-numbers-in-an-interval-range].html
2022-03-29 12:43:11 +08:00

24 lines
750 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<p>给你两个非负整数&nbsp;<code>low</code>&nbsp;<code>high</code>&nbsp;。请你返回<em>&nbsp;</em><code>low</code><em> </em><em>&nbsp;</em><code>high</code><em>&nbsp;</em>之间(包括二者)奇数的数目。</p>
<p>&nbsp;</p>
<p><strong>示例 1</strong></p>
<pre><strong>输入:</strong>low = 3, high = 7
<strong>输出:</strong>3
<strong>解释:</strong>3 到 7 之间奇数数字为 [3,5,7] 。</pre>
<p><strong>示例 2</strong></p>
<pre><strong>输入:</strong>low = 8, high = 10
<strong>输出:</strong>1
<strong>解释:</strong>8 到 10 之间奇数数字为 [9] 。</pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>0 &lt;= low &lt;= high&nbsp;&lt;= 10^9</code></li>
</ul>