hdu1002 wrong answer 怎么回事?
#include<stdio.h>#include<string.h>
int main(){
int T;
int i,j,k,l;
int m,n;
int c;
char cs1[1002],cs2[1002];
int is1[1002],is2[1002];
int ss[1002];
scanf("%d",&T);
for(i=0;i<T;i++){
memset(is1,0,sizeof(is1));
memset(is2,0,sizeof(is2));
c=0;
scanf("%s",cs1);
scanf("%s",cs2);
m=strlen(cs1);
n=strlen(cs2);
for(j=0;j<m;j++){
is1[j]=cs1[j]-'0';
}
for(j=0;j<n;j++){
is2[j]=cs2[j]-'0';
}
for(j=m,k=n,l=0;j>=0||k>=0;j--,k--,l++){
ss[l]=is1[j]+is2[k]+c;
c=ss[l]/10;
ss[l]=ss[l]%10;
}
ss[l]=c;
printf("Case %d:\n",i+1);
printf("%s ",cs1);
printf("+ ");
printf("%s ",cs2);
printf("= ");
if(ss[l])
printf("%d",ss[l]);
for(k=l-1;k>0;k--)
printf("%d",ss[k]);
printf("\n");
if(i<T-1)
printf("\n");
}
return 0;
}