import java.io.*; public class report2b3c { /** * @param args the command line arguments */ public static void main(String[] args) throws Exception { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); System.out.println("2のn乗を計算します。"); System.out.println(":n= "); int n = (new Integer(in.readLine())).intValue(); int l = 0; int v = 1; while(l < n) { l = l+1; v = v*2; } System.out.println("2の" + n + "乗は" + v + "です。" ); } }