class Solution {
public:
double myPow(double x, int n) {
double ans = 1.0;
char flag = '+';
long long b = n;
if (b < 0) {
flag = '-';
b = -b;
}
while (b) {
if (b % 2 == 1) {
ans = ans * x;
}
x = x * x;
b >>= 1;
}
if (flag == '-') ans = 1 / ans;
return ans;
}
};
class Solution {
public:
vector<int> printNumbers(int n) {
vector<int> result;
if (n){
for (int i = 1, max = pow(10, n); i < max; i++){
result.push_back(i);
}
}
return result;
}
};