```cpp
#include<bits/stdc++.h>
//#pragma GCC optimize(2)
#define int long long
using namespace std;
const int N=0;
signed main(){
ios::sync_with_stdio(0);
int n,sum=0;
cin>>n;
for(int i=1;i<=n;i++){
int t;
cin>>t;
sum+=t;
}
cout<<sum;
return 0;
}
#4 TLE
by scratch_szc @ 2024-07-29 13:13:05
@[__YNH__](/user/1086631) 负数判断要写在 `while` 里。
另外,用 `getchar_unlocked ()` 会比 `getchar ()` 要快得多。
by Y_QWQ_Y @ 2024-07-29 13:16:47
@[__YNH__](/user/1086631) `x%10+'0'` 要改成 `(x%10)+'0'
`,再把 `getchar ()` 改成 `getchar_unlocked ()` 就能过了
by Y_QWQ_Y @ 2024-07-29 13:19:51
@[scratch_szc](/user/1260767) 这是快读模板,正常读写不 T 才怪
by Y_QWQ_Y @ 2024-07-29 13:20:30
@[__YNH__](/user/1086631) [link](https://www.luogu.com.cn/article/nq8wvumt)
by FIRESTARS @ 2024-07-29 13:21:08
@[Y_QWQ_Y](/user/677091)
快读也过不了
by scratch_szc @ 2024-07-29 13:21:23
@[scratch_szc](/user/1260767) 因为这不是普通快读模板
by FIRESTARS @ 2024-07-29 13:22:08
@[Y_QWQ_Y](/user/677091)
[hear](https://www.luogu.com.cn/record/169231311)
by scratch_szc @ 2024-07-29 13:22:57
@[scratch_szc](/user/1260767) 但是 `getchar_unlocked` 能过啊
by Y_QWQ_Y @ 2024-07-29 13:23:12
@[FIRESTARS](/user/1073342)
那是什么()
by scratch_szc @ 2024-07-29 13:23:39