중앙이동1 [백준] 2903번: 중앙 이동 알고리즘 - java 풀이 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main2903 { public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int N = Integer.parseInt(br.readLine()); br.close(); int result = (int)Math.pow((Math.pow(2, N)+1), 2); System.out.println(result); } } 과정 수(N) 0 1 .. 2023. 6. 28. 이전 1 다음