高精度
java做
View Code
import java.io.*;
import java.util.*;
import java.math.*;
public class Main {
static public void main(String[] args) {
Scanner cin = new Scanner(new BufferedInputStream(System.in));
while (true) {
BigInteger a = cin.nextBigInteger();
int b = cin.nextInt();
if (a.equals(BigInteger.valueOf(0)) && b == 0)
return;
System.out.println(a.pow(b));
}
}
}