classSolution{publicdoublemyPow(double x,int n){if(x ==0)return0;long b = n;double res =1.0;if(b <0){
x =1/ x;
b =-b;}while(b >0){if((b %2)==1) res *= x;
x = x * x;
b >>=1;}return res;}}/*
快速幂解析:二分法角度
*/classSolution{publicdoublemyPow(double x,int n){if(x ==0)return0;long b = n;double res =1;if(b <0){
x =1/ x;
b =-b;}while(b >0){//当幂 和 1 进行与操作的时候,代表幂为奇数,此时将res *= x;if((b &1)==1) res *= x;
x = x * x;
b >>=1;}return res;}}
classSolution{publicint[]printNumbers(int n){int end =(int)Math.pow(10, n)-1;int[] res =newint[end];for(int i =0; i < end; i++){
res[i]= i +1;}return res;}}