import java.util.Scanner; import java.math.BigDecimal; public class Main{ public static void main(String[] args){ Scanner in = new Scanner(System.in); BigDecimal a; int n; while(in.hasNext()){ a = in.nextBigDecimal(); n = in.nextInt(); String s = a.pow(n).stripTrailingZeros().toPlainString(); if(s.startsWith("0")) s = s.substring(1); System.out.println(s); } } }
时间: 2024-10-15 00:07:33