import java.util.*;
public class Solution {
static Scanner sc = new Scanner(System.in);
static int mult(int n, int m) {
if( m<2 ) return n;
return n * mult(n, m-1);
}
public static void main(String[] args) {
for(int i=1; i<=10; i++) {
int tc = sc.nextInt();
int N = sc.nextInt();
int M = sc.nextInt();
System.out.format("#%d %d\n", tc, mult(N, M));
}
sc.close();
}
}
'JAVA 알고리즘 ' 카테고리의 다른 글
[SWEA] 1204. [S/W 문제해결 기본] 1일차 - 최빈수 구하기 (0) | 2019.08.23 |
---|---|
1222. [S/W 문제해결 기본] 6일차 - 계산기1 (0) | 2019.08.17 |
1206. [S/W 문제해결 기본] 1일차 - View (0) | 2019.08.13 |
[SWE]7102 준홍이의 카드놀이 (1) | 2019.08.09 |
SWEA 6730 장애물 경주 난이도 (1) | 2019.08.06 |