Advertisement
ivangarvanliev

Untitled

Jun 3rd, 2024
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     long long int n, s = 0, ele;
  7.     cin >> n;
  8.     for (int i = 0; i < n - 1; i++)
  9.     {
  10.         cin >> ele;
  11.         s += ele;
  12.     }
  13.     cout << n * (n + 1) / 2 - s;
  14.     return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement