标签:print font rip system while stat next 大数 高精度幂
1 import java.util.*; 2 import java.math.*; 3 public class Main{ 4 5 public static void main(String[] args) { 6 Scanner cin = new Scanner(System.in); 7 while (cin.hasNext()) { 8 BigDecimal numa = cin.nextBigDecimal(); 9 int numb = cin.nextInt(); 10 String str = numa.pow(numb).stripTrailingZeros().toPlainString(); 11 if (str.startsWith("0.")) {//如果开头是0.那么从小数点开始输出 12 System.out.println(str.substring(1)); 13 } else { 14 System.out.println(str); 15 } 16 } 17 } 18 }
标签:print font rip system while stat next 大数 高精度幂
原文地址:https://www.cnblogs.com/evidd/p/8979032.html