水题,注意数据范围
#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;
}
Codeforces Testing Round #10 A. Forgotten Episode
时间: 2024-11-05 12:26:18