a 를 2b배 만큼 곱한 값을 출력한다.

 

import java.io.IOException;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws IOException {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        int pow = (int) Math.pow(2, b);
        System.out.println(a*pow);
    }
}
복사했습니다!