hdu1002
void add(char str1[N],char str2[N])
{
int i,len1,len2;
int number1[N]={0};
int number2[N]={0};
len1=strlen(str1);
len2=strlen(str2);
for(i=len1-1;i>=0;i--)
{
number1[len1-i-1]=str1[i]-'0';
}
for(i=len2-1;i>=0;i--)
{
number2[len2-i-1]=str2[i]-'0';
}
for(i=0;i<len1||i<len2;i++)
{
number1[i+1]+=(number1[i]+number2[i])/10;
number1[i]=(number1[i]+number2[i])%10;
}
for(i=len1>len2?len1:len2;i>=0;i--)
if(number1[i]!=0)
break;
for(;i>=0;i--)
printf("%d",number1[i]);
printf("\n");
}