6 solutions

  • 2
    @ 2024-4-1 11:16:48
    #include <iostream>
    using namespace std;
    
    int main() {
    	long long lkb, hzy;
    	cin >> lkb >> hzy;
    	cout << lkb + hzy;
    	return 0;
    }
    
    • 1
      @ 2024-3-5 21:55:45
      #include <iostream>
      using namespace std;
      
      int main() {
      	long long lkb, hzy;
      	cin >> lkb >> hzy;
      	cout << lkb + hzy;
      	return 0;
      }
      
      • 1
        @ 2023-10-15 20:39:29
        #include<stdio.h>
        int main(){long long a,b;scanf("%d%d",&a,&b);printf("%d %d",a,b);}
        
        • 0
          @ 2024-9-6 9:23:03

          #include using namespace std;

          int main() { long long ts, th; cin >> ts >> th; cout << ts + th; return 0; }

          • 0
            @ 2023-6-1 22:15:01
            #include <iostream>
            using namespace std;
            
            int main() {
            	long long lkb, hzy;
            	cin >> lkb >> hzy;
            	cout << lkb + hzy;
            	return 0;
            }
            
            • -3
              @ 2024-8-13 11:37:17

              很明显,新手可能并不知道如何使用加法符号,所以我们可以通过高精度来实现

              
              #include<bits/stdc++.h>
              using namespace std;
              int a[250],b[250],c[250];
              int main(){
              string A,B;
              cin>>A>>B;
              int len=max(A.length(),B.length());
              for(int i=A.length()-1,j=1;i>=0;i--,j++)a[j]=A[i]-'0';
              for(int i=B.length()-1,j=1;i>=0;i--,j++)b[j]=B[i]-'0';
              for(int i=1;i<=len;i++){
              c[i]+=a[i]+b[i];
              c[i+1]=c[i]/10;
              c[i]%=10;
              }
              if(c[len+1])len++;
              for(int i=len;i>=1;i--)cout<<c[i];
              return 0;
              }
              
              //纯恶意,无娱乐
              • 1

              Information

              ID
              6762
              Time
              1000ms
              Memory
              128MiB
              Difficulty
              1
              Tags
              # Submissions
              358
              Accepted
              77
              Uploaded By