代码:
- import java.util.*;
- public class Main {
- public static void main (String [] args) {
- int repeat,n;
- double x;
- Scanner s=new Scanner(System.in);
- repeat=s.nextInt();
- for(int i=1;i<=repeat;i++) {
- x=s.nextDouble();
- n=s.nextInt();
- double pow=Math.pow(x,n);
- System.out.println(String.format("%.2f", pow));
- }
- }
- }
来源: http://www.bubuko.com/infodetail-3095681.html