double quick_power(double x,unsigned int n){ if (n==0) return 1; if (n==1) return x; return quick_power(x,n/2)*quick_power(x,n/2)*((n&1)?x:1); }