[模板] 高精度
struct node{
int len,num[1005];
node(){
len=0;memset(num,0,sizeof num);
}
node operator +(node a){
node res;
res.len=max(a.len,this->len);
int t=0;
for(int i=1;i<=res.len||t;i++){
t+=this->num[i]+a.num[i];
res.num[i]=t%10;
t/=10;
}
return res;
}
node operator *(int b){
node c=*this;
int t=0;
for(int i=1;i<=c.len;i++){
t+=c.num[i]*b;
c.num[i]=t%10;
t/=10;
}
int &len = c.len;
while(t){
c.num[++len]=t%10;
t/=10;
}
return c;
}
};