首页 > 代码库 > Codeforces Testing Round #10 A. Forgotten Episode

Codeforces Testing Round #10 A. Forgotten Episode

水题,注意数据范围

#include <iostream>
using namespace std;

int main(){
    long long n,a;
    cin >> n;
    long long  sum =(n*(n+1))>>1;
    for(int i = 0 ; i < n-1 ; ++i){
        cin >>a;
        sum -=a;
    }
    cout<<sum<<endl;
}