blob: 7bb2dbdc11d79b0b55659305053f10a031f12f2e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// 1083. Missing Number
#include <bits/stdc++.h>
using namespace std;
int main() {
static int num, xum, x;
scanf("%d", &num);
for (int i = 1; i <= num; i++)
xum ^= i;
for (int i = 0; i < num - 1; i++) {
scanf("%d", &x);
xum ^= x;
}
printf("%d\n", xum);
}
|