結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー kuramukuramu
提出日時 2016-01-19 23:16:44
言語 Java21
(openjdk 21)
結果
AC  
実行時間 55 ms / 5,000 ms
コード長 539 bytes
コンパイル時間 2,400 ms
コンパイル使用メモリ 75,232 KB
実行使用メモリ 53,516 KB
最終ジャッジ日時 2023-10-21 13:24:47
合計ジャッジ時間 4,168 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
52,408 KB
testcase_01 AC 50 ms
53,448 KB
testcase_02 AC 51 ms
53,504 KB
testcase_03 AC 50 ms
53,504 KB
testcase_04 AC 54 ms
53,504 KB
testcase_05 AC 50 ms
53,500 KB
testcase_06 AC 51 ms
53,500 KB
testcase_07 AC 51 ms
52,384 KB
testcase_08 AC 51 ms
53,500 KB
testcase_09 AC 49 ms
53,500 KB
testcase_10 AC 50 ms
53,448 KB
testcase_11 AC 51 ms
53,504 KB
testcase_12 AC 51 ms
53,504 KB
testcase_13 AC 50 ms
53,504 KB
testcase_14 AC 51 ms
52,384 KB
testcase_15 AC 50 ms
53,508 KB
testcase_16 AC 51 ms
53,508 KB
testcase_17 AC 50 ms
53,500 KB
testcase_18 AC 50 ms
53,508 KB
testcase_19 AC 55 ms
53,500 KB
testcase_20 AC 50 ms
53,508 KB
testcase_21 AC 49 ms
53,516 KB
testcase_22 AC 50 ms
53,500 KB
testcase_23 AC 50 ms
53,504 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {

	public static void main(String[] args) {
	      BufferedReader stdReader =new BufferedReader(new InputStreamReader(System.in));
	      String line = "";
	      int count = -1;
	      try {
	    	  int N = Integer.parseInt(stdReader.readLine());
	    	  while(N >Math.pow(2, (count++ + 1)));
	    	  System.out.println(count);
	    	  } catch (IOException e) {
			e.printStackTrace();
	      }
	}
}
0