1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-19 12:06:48 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-03-29 12:43:11 +08:00
parent 58bbdfd57c
commit 2b0511d272
10721 changed files with 8123 additions and 8119 deletions

View File

@@ -0,0 +1,33 @@
<p>给你一个整数数组&nbsp;<code>nums</code>,请你返回其中位数为&nbsp;<strong>偶数</strong>&nbsp;的数字的个数。</p>
<p>&nbsp;</p>
<p><strong>示例 1</strong></p>
<pre><strong>输入:</strong>nums = [12,345,2,6,7896]
<strong>输出:</strong>2
<strong>解释:
</strong>12 是 2 位数字(位数为偶数)&nbsp;
345 是 3 位数字(位数为奇数)&nbsp;&nbsp;
2 是 1 位数字(位数为奇数)&nbsp;
6 是 1 位数字 位数为奇数)&nbsp;
7896 是 4 位数字(位数为偶数)&nbsp;&nbsp;
因此只有 12 和 7896 是位数为偶数的数字
</pre>
<p><strong>示例 2</strong></p>
<pre><strong>输入:</strong>nums = [555,901,482,1771]
<strong>输出:</strong>1
<strong>解释: </strong>
只有 1771 是位数为偶数的数字。
</pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>1 &lt;= nums.length &lt;= 500</code></li>
<li><code>1 &lt;= nums[i] &lt;= 10^5</code></li>
</ul>