Type: Default 1000ms 256MiB

寻找消失的数据

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.

Background

Special for beginners, ^_^

Description

已知计算机使用二进制进行计算,其中有一种运算方法叫异或运算,相同为0,相异为1,例如a(任意数)^0=a等等。 现输入一个正整数n(0<n<=10000),再输入包含n个互不相同的整数的数组nums,数组中的元素范围在[0,n]之间。因为数组长度为n,所以范围[0,n]总共包含n+1个数字。请找出数组中缺失的那个数字。

Format

Input

整数n和整数数组nums

Output

一个整数

Samples

4
0 1 2 4
3

Limitation

1s, 1024KiB for each test case.

国庆七天乐

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
11
Start at
2025-9-30 6:00
End at
2025-10-8 14:00
Duration
200 hour(s)
Host
Partic.
50