poj 3199 高精度 java
最近每天一道java
View Code
1 import java.io.*;
2 import java.awt.*;
3 import java.math.*;
4 import java.text.*;
5 import java.util.*;
6 public class Main {
7 public static void main(String[] args) {
8 Scanner cin=new Scanner(System.in);
9 BigInteger a,c;
10 while(cin.hasNext())
11 {
12 a=cin.nextBigInteger();
13 int b=cin.nextInt();
14 if(a.compareTo(BigInteger.ZERO)==0&&b==0)
15 break;
16 System.out.println(a.pow(b));
17 }
18 }
19 }