1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-03-14 16:22:24 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/点名 [que-shi-de-shu-zi-lcof].html

23 lines
548 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>某班级 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>示例 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>