import java.util.Scanner;
class Solution {
public static void main(String args[]) throws Exception {
Scanner sc = new Scanner(System.in);
for (int testCase = 1; testCase <= 10; testCase++) {
int n = sc.nextInt();
int x = sc.nextInt();
int y = sc.nextInt();
System.out.printf("#%d %d\n", n, (int)Math.pow(x, y));
}
}
}
재귀로 풀어야하는 문제지만 빠르게 해결하기위해 Math.pow()
를 사용하였다.