帮忙看下问题
#include<bits/stdc++.h>
using namespace std;
string a,b;
int p1[100005];
int p2[100005];
int sum1[1000006];
signed main(){
cin>>a>>b;
for(int i=0; i<=a.size()-1; ++i){
p1[i]=(a[i]-48);
}
for(int i=0; i<=b.size()-1; ++i){
p2[i]=(b[i]-48);
}
int lenth=max(a.size(),b.size());
for(int i=0; i<=lenth-1; ++i){
if(p1[i]+p2[i]>=10){
sum1[i-1]++;
sum1[i]=p1[i]+p2[i]-10;
}
else {
sum1[i]=p1[i]+p2[i];
}
}
for(int i=0; i<=lenth-1; ++i){
cout<<sum1[i];
}
return false;
}
我是人J