본문 바로가기

Algorithm/Baekjoon

[백준_JAVA] 2903 중앙 이동 알고리즘

import java.util.Scanner;

public class Main{
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	 	
    	int N = sc.nextInt();
    	
    	System.out.print((int)Math.pow(Math.pow(2, N)+1,2));
        sc.close();
    }
}

'Algorithm > Baekjoon' 카테고리의 다른 글

[백준_JAVA] 25206 너의 평점은  (0) 2024.01.21
[백준_JAVA] 2292 벌집  (1) 2023.08.30
[백준_JAVA] 11005 진법 변환 2  (0) 2023.08.28
[백준_JAVA] 1157 단어 공부  (0) 2023.08.27
[백준_JAVA] 2720 세탁소 사장 동혁  (0) 2023.08.18