丢失的数字
No testdata at current.
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
题目描述
给定一个包含 [0, n]中n个数的数组 nums,找出 [0, n]这个范围内没有出现在数组中的那个数。
输入输出说明
输入说明
输入为2行,第一行为n,第二行为n个数。
输出说明
输出一个数,为0~n中没有出现的那个数字
题目样例
样例输入
3
3 0 1
样例输出
2
数据范围
- n == nums.length
- 1 <= n <= 10000
- 0 <= nums[i] <= n
- nums 中的所有数字都 独一无二
P3阶段测试
- Status
- Done
- Rule
- IOI
- Problem
- 6
- Start at
- 2026-3-14 13:15
- End at
- 2026-3-14 15:15
- Duration
- 2 hour(s)
- Host
- Partic.
- 9