PS/Baekjoon Online Judge
[백준 11772] POT [Java]
kimyoungrok
2025. 2. 18. 11:23
728x90
문제
https://www.acmicpc.net/problem/11772
풀이
주어지는 X개의 P에 대해 ${P / 10}^{P의 1의 자리}$를 구하는 문제다.
while (N-- > 0) {
final int P = Integer.parseInt(br.readLine());
res += (int) Math.pow(P / 10, P % 10);
}
소스코드
https://github.com/rogi-rogi/problem-solving/blob/main/baekjoon-online-judge/practice/11722.java
728x90