标签:style blog http ar color os sp for on
int main() { freopen("in1.txt","r",stdin); freopen("out.txt","w",stdout); int i=0,j=0; int temp=0, a[200],b[200],f[400]; char s[200]; scanf("%s",s); memset(a,0,sizeof(a)); memset(f,0,sizeof(f)); int length=strlen(s); for(i=length-1;i>=0;i--) a[j++]=s[i]-‘0‘; j=0; scanf("%s",s); memset(b,0,sizeof(b)); int length1=strlen(s); for(i=length1-1;i>=0;i--) b[j++]=s[i]-‘0‘; for(i=0;i<=200;i++) { int c=0; for(j=0;j<=200;j++) { temp=b[i]*a[j]+c+f[i+j]; f[i+j]=temp%10; c=temp/10; } } for(j=400;j>=0;j--) if(f[j]) break; for(i=j;i>=0;i--) { printf("%d",f[i]); } printf("\n"); return 0; }
标签:style blog http ar color os sp for on
原文地址:http://www.cnblogs.com/been/p/4112961.html