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;
}

 

posted @ 2014-06-09 22:34  OpenSoucre  阅读(149)  评论(0编辑  收藏  举报