1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-13 11:21:42 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

add leetcode problem-cn part1

This commit is contained in:
2022-03-27 20:37:52 +08:00
parent 8e542045d1
commit c554fc6908
1285 changed files with 108123 additions and 0 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>