ooliver 快读模板 2025-09-28 21:07 #include<bits/stdc++.h> using namespace std; #define int long long int read(){ int k=0,f=1; char c=getchar_unlocked(); while(c<'0'||c>'9'){ if(c=='-') f=-1; c=getchar_unlocked(); } while(c>='0'&&c<='9') k=k*10+c-'0',c=getchar_unlocked(); return k*f; } void put(int x){ if(x<0) putchar('-'),x=-x; if(x<10) putchar(x+'0'); else put(x/10),putchar(x%10+'0'); } signed main(){ int n=read(),sum=0; while(n--) sum+=read(); put(sum); return 0; } #include<bits/stdc++.h> using namespace std; #define int long long int read(){ int k=0,f=1; char c=getchar_unlocked(); while(c<'0'||c>'9'){ if(c=='-') f=-1; c=getchar_unlocked(); } while(c>='0'&&c<='9') k=k*10+c-'0',c=getchar_unlocked(); return k*f; } void put(int x){ if(x<0) putchar('-'),x=-x; if(x<10) putchar(x+'0'); else put(x/10),putchar(x%10+'0'); } signed main(){ int n=read(),sum=0; while(n--) sum+=read(); put(sum); return 0; }
ooliver 神秘小技巧 2025-09-15 20:43 我是颠佬,还在为找不到作业本答案而发愁吗?可以访问小神器江西智慧教育平台!不用再为找答案两小时,抄答案五分钟而烦恼了!不要告诉别人哟!链接:http://xxyd.jxeduyun.com/resource/list