
-Code
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class BOJ34459 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.parseInt(br.readLine());
for (int i = 0; i < t; i++) {
int n = Integer.parseInt(br.readLine());
int linit = 5;
int cnt = 1;
while (linit < n) {
linit *= 5;
cnt++;
}
System.out.println(cnt == 1 ? "MIT time" : String.format("MIT^%d time", cnt));
}
}
}'Beakjoon&프로그래머스 > Java' 카테고리의 다른 글
| [백준/Java] 34644번 Ten Player Bingo (0) | 2025.10.29 |
|---|---|
| [백준/Java] 34466번 Positioning Peter’s Paintings (0) | 2025.10.28 |
| [백준/Java] 34447번 Bad Directions (0) | 2025.10.26 |
| [백준/Java] 34441번 Ski Traffic (0) | 2025.10.25 |
| [백준/Java] 28939번 Шкаф для обуви (0) | 2025.10.24 |