会出现无关字符
#include <bits/stdc++.h>
using namespace std;
string s1,s2,ans;
int l1,l2,jw;
int main()
{
cin >> s1 >> s2;
l1 = s1.length(),l2 = s2.length();
if(l2 > l1)
{
swap(l1,l2);
swap(s1,s2);
}
reverse(s1.begin(),s1.end());
reverse(s2.begin(),s2.end());
for(int i = 0;i < l1;i++)
{
int t1 = s1[i] - '0',t2 = s2[i] - '0';
ans += (t1 + t2 + jw) % 10 + '0';
jw = (t1 + t2 + jw) / 10;
}
if(jw != 0) ans += jw + '0';
reverse(ans.begin(),ans.end());
cout << ans;
return 0;
}