#include<bits/stdc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio (0);
cin.tie (0);
cout.tie(0);
long long i,du,nho,k;
string s1,s2,res;
cin>>s1>>s2;
while(s1.size()<s2.size())
s1='0'+s1;
while(s2.size()<s1.size())
s2='0'+s2;
i=s1.size()-1;
nho=0;
res="";
while(i>=0){
k=s1[i]-48+s2[i]-48+nho;
nho=k/10;
du=k%10;
res=(char)(du+48)+res;
i--;
}
if(nho==1)
res='1'+res;
cout<<res;
return 0;
}
Đúng 3
Bình luận (0)