5 条题解

  • 2
    @ 2024-7-19 9:12:04

    #include<bits/stdc++.h> using namespace std; int a[101],b[101],c[101]; int main(){ int n,j=1,y=1,t=1; cin>>n; for(int i=1;i<=n;i++){ cin>>a[i]>>b[i]>>c[i]; j+=a[i]; y+=b[i]; t+=c[i]; } cout<<j<<" "<<y<<" "<<t<<" "<<j+y+t; }

    • 1
      @ 2024-7-23 10:52:51
      #include<bits/stdc++.h>
      using namespace std;
      const int maxn=101;
      int a[maxn][4];
      int main(){
      	int n,g=0,s=0,b=0,num=0;
      	cin>>n;
      	for(int i=1;i<=n;i++){
      		for(int j=1;j<=3;j++){
      			cin>>a[i][j];
      		}
      	}
      	for(int i=1;i<=n;i++){
      		g+=a[i][1];
      		s+=a[i][2];
      		b+=a[i][3];
      	}
      	num=g+s+b;
      	cout<<g<<" "<<s<<" "<<b<<" "<<num;
      	return 0;
      }
      
      • 1
        @ 2024-7-17 11:46:41
        
        

        #include<bits/stdc++.h> using namespace std; int j[101]; int y[101]; int T[101]; int main(){ int t,jz=0,yz=0,tz=0; cin>>t; for(int i=1;i<=t;i++){ cin>>j[i]>>y[i]>>T[i]; jz+=j[i]; yz+=y[i]; tz+=T[i]; } cout<<jz<<" "<<yz<<" "<<tz<<" "<<jz+yz+tz; return 0; }

        • 0
          @ 2024-7-17 13:08:33
          
          ```#include<bits/stdc++.h> 
          using namespace std;
          int j[101];
          int y[101]; 
          int T[101]; 
          int main(){ 
          	int t,jz=0,yz=0,tz=0; 
          	cin>>t; 
          	for(int i=1;i<=t;i++){ 
          		cin>>j[i]>>y[i]>>T[i]; 
          		jz+=j[i]; yz+=y[i]; 
          		tz+=T[i]; 
          		} 
          	cout<<jz<<" "<<yz<<" "<<tz<<" "<<jz+yz+tz; 
          	return 0; 
          }
          ```language
          ```good
          • -1
            @ 2024-7-18 14:12:42
            
            ```#include<bits/stdc++.h> 
            using namespace std;
            int j[101];
            int y[101]; 
            int T[101]; 
            int main(){ 
            	int t,jz=0,yz=0,tz=0; 
            	cin>>t; 
            	for(int i=1;i<=t;i++){ 
            		cin>>j[i]>>y[i]>>T[i]; 
            		jz+=j[i]; yz+=y[i]; 
            		tz+=T[i]; 
            		} 
            	cout<<jz<<" "<<yz<<" "<<tz<<" "<<jz+yz+tz; 
            	return 0; 
            }
            ```language
            ```good
            
            • 1

            信息

            ID
            108
            时间
            1000ms
            内存
            128MiB
            难度
            4
            标签
            (无)
            递交数
            216
            已通过
            104
            上传者