//基础高精度 #include#include #include #include #include #include #include #include using namespace std;struct Bign{ vector val; Bign() { val.clear(); val.resize(1,0); return ; } Bign(const char* str) { int _n=strlen(str),data=0,base=1; for(int i=_n-1; i>=0; --i) { data=data+(str[i]-48)*base; if((_n-i)%4==0) { val.push_back(data),data=0,base=1; continue; } base*=10; } val.push_back(data); clear(); return ; } void clear() { while(val.size()>1 && val.back()==0)val.pop_back(); return ; } void resize(const int x,const int y) { val.resize(x,y); } unsigned int size()const { return val.size(); } Bign(const int temp) { char str[20]; sprintf(str,"%d",temp); Bign C(str); *this=C; } void operator=(const int temp) { Bign C(temp); *this=C; return ; } void operator=(const char* str) { Bign C(str); *this=C; return ; } int& operator[](const int pos) { return val[pos]; } Bign operator+(Bign B) { Bign A=*this,C; C.resize(max(A.size(),B.size())+1,0); for(int i=0; i<(int)C.size(); ++i) { if(i<(int)A.size())C[i]+=A[i]; if(i<(int)B.size())C[i]+=B[i]; } for(int i=0; i<(int)C.size(); ++i) { C[i+1]+=C[i]/10000; C[i]%=10000; } C.clear(); return C; } Bign operator+(const int temp) { return *this+Bign(temp); } Bign operator-(Bign B) { Bign A=*this,C; if(A =0; --i) { R=R*10000; R[0]=A[i]; while(R>=B) { R=R-B; C[i]++; } } C.clear(); return C; } Bign operator/(const int temp) { return *this/Bign(temp); } Bign operator%(Bign B) { Bign A=*this; return A-A/B*B; } Bign operator%(const int temp) { return *this%Bign(temp); } bool operator<(Bign B)const { if(val.size()!=B.size())return val.size() =0; --i) if(val[i]!=B[i])return val[i] (Bign B)const { return B<*this; } bool operator==(Bign B)const { return !(*this <*this); } bool operator!=(Bign B)const { return !(*this==B); } bool operator<=(Bign B)const { return !(*this>B); } bool operator>=(Bign B)const { return !(*this =0; --i) { char s[11]; sprintf(s,"%04d",val[i]); strcat(str,s); } return ; }};char str1[11000],str2[1100],Ans[1100000];int main(){ Bign A,B,C; scanf("%s%s",str1,str2); A=str1; B=str2; C=A*B; C.c_str(Ans); printf("%s\n",Ans); return 0;}