n^m 구하기 (재귀함수 이용해서!)
재귀함수 오랜만이라서 검색 좀 함,,;;
import java.util.Scanner;
class Solution
{
public static void main(String args[]) throws Exception
{
Scanner sc = new Scanner(System.in);
int T = 10;
for(int test_case = 1; test_case <= T; test_case++)
{
int i = sc.nextInt();
int n = sc.nextInt();
int m = sc.nextInt();
int result = calc(n,m);
System.out.println("#"+i+" "+result);
}
}
//재귀함수
public static int calc(int n, int m){
if (m==0) return 1;
return n*calc(n,m-1);
}
}