Advertisement
STANAANDREY

hackathon: pb: "programming contest"(3)

Jan 24th, 2022
1,108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define int long long
  4.  
  5. signed main() {
  6.     //freopen("text.in", "r", stdin);
  7.     int n, sum = 0;
  8.     cin >> n;
  9.     for (int x; cin >> x;) {
  10.         cerr << x << endl;
  11.         sum += x;
  12.     }
  13.     int ans = n * (n + 1) / 2 - sum;
  14.     if (!ans) {
  15.         puts("NU");
  16.     } else {
  17.         cout << ans << endl;
  18.     }
  19.     return 0;
  20. }
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement