快速幂求a^b
public class text1 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
long sum = 1;
while (b != 0) {
if (b % 2 != 0) {
sum *= a;
}
sum *= sum;
b /= 2;
}
System.out.println(sum);
}
}