new file: P10815.cpp
Check cpp / md pair / Check md headers (push) Failing after 2s

This commit is contained in:
hanyixuanten committed 2026-10-23 10:43:08 +00:00
1 parent cd0c65ca4e
commit ac9df32e58
2 files changed
+75

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
#include <bits/stdc++.h>
using namespace std;
void read(int &x) {
x = 0;
bool fu = 0;
char c = getchar_unlocked();
while ((c < '0' || c > '9') && c != '-')
c = getchar_unlocked();
if(c=='-') fu=1, c=getchar_unlocked();
while (c>='0' && c<='9'){
x = 10*x+c-'0', c = getchar_unlocked();
}
x=((fu)?-1:1)*x;
}
int main(){
int n, ans=0;
scanf("%d", &n);
for(int i = 1; i <= n; i++) {
int x;
read(x);
ans+=x;
}
printf("%d\n", ans);
return 0;
}