1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-11 02:58:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/点名 [que-shi-de-shu-zi-lcof].html
2023-12-09 18:53:53 +08:00

23 lines
545 B
HTML

<p>某班级 n 位同学的学号为 0 ~ n-1。点名结果记录于升序数组 <code>records</code>。假定仅有一位同学缺席,请返回他的学号。</p>
<p>&nbsp;</p>
<p><strong>示例 1:</strong></p>
<pre>
<strong>输入:</strong> records = [0,1,2,3,5]
<strong>输出:</strong> 4
</pre>
<p><strong>示例&nbsp;2:</strong></p>
<pre>
<strong>输入:</strong> records = [0, 1, 2, 3, 4, 5, 6, 8]
<strong>输出:</strong> 7</pre>
<p>&nbsp;</p>
<p><b>提示:</b></p>
<p><code>1 &lt;= records.length&nbsp;&lt;= 10000</code></p>