标签:imp rgs tar ble span href system port scan
http://poj.org/problem?id=1001
计算小数的幂,高精度
第一次用java ac,^-^
1 import java.util.*; 2 import java.math.*; 3 4 public class Main { 5 public static void main(String args[]) { 6 Scanner cin = new Scanner(System.in); 7 while (cin.hasNext()) { 8 String a = cin.next(); 9 int t = cin.nextInt(); 10 BigDecimal ans = new BigDecimal(a); 11 ans = ans.pow(t); 12 String res = ans.stripTrailingZeros().toPlainString(); 13 if (res.charAt(0) == ‘0‘) res = res.substring(1); 14 System.out.println(res); 15 } 16 } 17 }
标签:imp rgs tar ble span href system port scan
原文地址:http://www.cnblogs.com/baocong/p/6814155.html