long double myPower(long double x, unsigned int n, int* cnt)
{
if (n & 1) {
if (n - 1 == 0) {
return x;
} else {
(*cnt)++;
return x * myPower(x, n - 1, cnt);
}
} else {
(*cnt)++;
return myPower(x * x, n / 2, cnt);
}
}
