良心商家
#include <bits/stdc++.h>
using namespace std;
int main()
{
char a1[5005],b1[5005];
int a[5005],b[5005],c[5005];
memset(a,0,sizeof(a)); memset(b,0,sizeof(b));
memset(c,0,sizeof(c));
scanf("%s%s",a1,b1);
int lena = strlen(a1);
int lenb = strlen(b1);
for(int i = 0;i < lena;i++) {
a[lena - i] = a1[i] - '0';
}
for(int i = 0;i < lenb;i++) {
b[lenb - i] = b1[i] - '0';
}
int lenc = 1; int x = 0; while(lenc <= lena || lenc <= lenb) {
c[lenc] = a[lenc] + b[lenc] + x;
x = c[lenc] / 10;
c[lenc] %= 10;
lenc++;
}
c[lenc] = x;
if(c[lenc] == 0) {
lenc--;
}
for(int i = lenc;i >= 1;i--)
{
printf("%d",c[i]);
}
printf("\n");
return 0;
}