5 条题解
-
3丁浩楠 (2022ts159) LV 7 @ 2022-12-15 20:03:01
太简单了!
#include<iostream> using namespace std; int main(){ long long n,a,b,c,A=0,B=0,C=0,s; cin>>n; for(int i=1;i<=n;i++){ cin>>a>>b>>c; A+=a; B+=b; C+=c; } s=A+B+C; cout<<A<<" "<<B<<" "<<C<<" "<<s<<" "; }
-
02024-6-12 20:22:38@
#include<iostream> using namespace std; int main() { long long n,sum=0,usm=0,msu=0,abc=0; cin>>n; for(int i=1;i<=n;i++) { long long x,y,z; cin>>x>>y>>z; sum=sum+x; usm=usm+y; msu=msu+z; } abc=sum+usm+msu; cout<<sum<<" "<<usm<<" "<<msu<<" "<<abc; }
-
02024-6-12 20:07:35@
#include<cstdio> #include<cstdlib> #include<cmath> #include<cctype> #include<cstring> #include<string> #include<vector> #include<set> #include<stack> #include<queue> #include<iostream> #include<iomanip> #include<ctime> #include<algorithm> #include<map> using namespace std; int main(){ int n,j=0,y=0,t=0,sum=0; cin>>n; for(int i=1;i<=n;i++){ int a,b,c; cin>>a>>b>>c; j+=a; y+=b; t+=c; } sum=sum+j+y+t; printf("%d %d %d %d",j,y,t,sum); }
-
-22022-7-5 16:56:26@
#include<stdio.h> #include<iostream> using namespace std; int main() { int n,a,b,c,sum=0,num=0,ans=0; cin>>n; for(int i=1;i<=n;i++) { cin>>a>>b>>c; sum+=a; num+=b; ans+=c; } cout<<sum<<" "<<num<<" "<<ans<<" "; cout<<sum+num+ans<<endl; }
-
-32022-10-20 20:38:26@
#include<stdio.h> #include<iostream> using namespace std; int main() { int n,a,b,c,sum=0,num=0,ans=0; cin>>n; for(int i=1;i<=n;i++) { cin>>a>>b>>c; sum+=a;num+=b; ans+=c; } cout<<sum<<" "<<num<<" "<<ans<<" "; cout<<sum+num+ans<<endl; }
- 1
信息
- ID
- 894
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 3
- 标签
- 递交数
- 284
- 已通过
- 142
- 上传者