#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
const int M=1000005;
char a[M],b[M],ans[M];
int main()
{
int n,i,t,w;
while(scanf("%d",&n)!=EOF)
{
getchar();
for(i=n-1;i>=0;i--)
{
a[i]=getchar();
getchar();
b[i]=getchar();
getchar();
}
for(i=0,w=0;i<n;i++)
{
t=a[i]+b[i]-'0'-'0'+w;
ans[n-i-1]=(t%10)+'0';
w=t/10;
}
puts(ans);
}
return 0;
}
poj2602 Superlong sums(高精度)
最新推荐文章于 2019-01-09 08:05:59 发布