poj3199

高精度

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));
}
}
}
posted @ 2011-09-16 17:15  金海峰  阅读(128)  评论(0编辑  收藏  举报