1 int multi(int a,int b) 2 { 3 if(b==0) 4 return 1; 5 if(b==1) 6 return a; 7 int ret=multi(a,b/2); 8 ret=(ret*ret)%MOD; 9 if(b&1) 10 ret=ret*a%MOD; 11 return ret; 12 }