10 条题解

  • 2
    @ 2024-3-5 22:07:48
    #include<bits/stdc++.h> 
    using namespace std; 
    int main(){ 
        int b,sum=0,d,i; 
        cin>>b; 
        for(i=1;i<=b;i++){ 
            cin>>d;
            sum+=d;
            } 
            cout<<sum; }
    
    • 1
      @ 2024-3-31 10:06:39

      #include <bits/stdc++.h>

      using namespace std;

      int main() { int n,a,sum=0; cin >> n; for (int i=0;i<n;i++){ cin >> a; sum=sum+a; } cout << sum;

      return 0;
      

      }

      • 0
        @ 2024-3-24 10:14:22

        #include<bits/stdc++.h> using namespace std; int main(){ int n,a,sum = 0; cin>>n; for(int i =1;i<=n;i++){ cin>>a; sum=sum+a; } cout<<sum; return 0; } 勿抄 不然晚上偷你家马桶盖

        • -1
          @ 2024-3-17 9:06:24

          #include<bits/stdc++.h> using namespace std; int main(){ int d,b,i,sum=0; cin>>d; for(i=1;i<=d;i++){ cin>>b; sum=sum+b; } cout<<sum; return 0; }

          • -2
            @ 2024-3-24 10:15:12

            #include<bits/stdc++.h> using namespace std; int main(){ int n,a,sum = 0; cin>>n; for(int i=1;i<=n;i++){ cin>>a; sum =sum+a; } cout<<sum; return 0; }

            • -2
              @ 2024-3-22 17:54:06

              #include<bits/stdc++.h> using namespace std; int main(){ int a,b=0,c,i; cin>>a; for(i=1;i<=a;i++){ cin>>c; b+=c; } cout<<b; return 0; }

              • -3
                @ 2024-3-20 18:15:45
                #include<bits/stdc++.h>
                using namespace std;
                int main(){
                	int m,n,a=0;
                	cin>>m>>n;
                	while(m<=n){
                    if(m%2==1){
                    	a=a+m;
                	}
                	m++;
                	}
                	cout<<a;
                	return 0;
                }
                
                • -3
                  @ 2024-3-10 9:42:46
                  #include<bits/stdc++.h> 
                  using namespace std; 
                  int main(){ 
                      int b,sum=0,d,i; 
                      cin>>b; 
                      for(i=1;i<=b;i++){ 
                          cin>>d;
                          sum+=d;
                          } 
                          cout<<sum; }
                  
                  • -4
                    @ 2024-3-10 11:40:19

                    #include<bits/stdc++.h> using namespace std; int main(){ int m,n,i,sum=0; cin>>m; for(i=1;i<=m;i++){ cin>>n; sum+=n; } cout<<sum; return 0; }

                    • -5
                      @ 2024-3-10 9:44:18
                      #include<bits/stdc++.h> 
                      using namespace std; 
                      int main(){ 
                          int b,sum=0,d,i; 
                          cin>>b; 
                          for(i=1;i<=b;i++){ 
                              cin>>d;
                              sum+=d;
                              } 
                              cout<<sum; }
                      
                      • 1

                      信息

                      ID
                      2136
                      时间
                      1000ms
                      内存
                      256MiB
                      难度
                      2
                      标签
                      递交数
                      609
                      已通过
                      291
                      上传者