-
-
Save jail238/f0d21c8954eedd5c3e52db501246bcd1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() { | |
cin.tie(0); | |
ios_base::sync_with_stdio(0); | |
int n, s = 0; | |
cin >> n; | |
for (int i = 0; i < n; i++){ | |
s += i; | |
int x; | |
cin >> x; | |
s -= x; | |
} | |
cout << -s; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment