Words will Noip, the first two days of simulation test a need to press the high-precision high-precision, and then I found that high-accuracy multiplication has no template. It's hard to say what I'm writing. Because the detection of high precision is not a simple calculation, and just learned the overloaded operator, so it might be easier to write this way. Anyway, at least it should be enough. If the parents don't like it, then I don't exist.
#include <cstdio> #include <cstring> #include <cstdlib> #include <iostream> #include <cmath
> #include <algorithm> using namespace std;
Char a[402],b[402];
struct Shu{int s[1602],l;} a,b,c;
void Pre () {A.l=strlen (a+1); B.l=strlen (b+1);
int i,t;
for (i=1;i<=a.l;i++) {t=a[i]-' 0 '; a.s[i]=a[a.l-i+1]-' 0 '; a.s[a.l-i+1]=t;}
for (i=1;i<=b.l;i++) {t=b[i]-' 0 '; b.s[i]=b[b.l-i+1]-' 0 '; b.s[b.l-i+1]=t;}}
Shu operator * (const shu &x,const shu &y) {shu ans;
memset (ans.s,0,sizeof (ANS.S));
int i,j;
for (i=1;i<=x.l;i++) for (j=1;j<=y.l;j++) ans.s[i+j-1]+=x.s[i]*y.s[j];
ANS.L=X.L+Y.L-1;
for (i=1;i<=ans.l;i++) {if (ans.s[i]>=10) {ANS.S[I+1]+=ANS.S[I]/10;
ans.s[i]%=10;
}} i=ans.l+1;
while (ans.s[i]>0) {if (ans.s[i]>=10) {ANS.S[I+1]+=ANS.S[I]/10;
ans.s[i]%=10;
} i++;
} ans.l=i-1;
return ans;
} int main () {while (scanf ("%s%s", a+1,b+1)!=eof) {pre ();
C=a*b; for (int i=c.l;i>0;i--) printf ("%d", c.s[i]);
printf ("\ n");
} return 0; }