結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー TatsuDXTatsuDX
提出日時 2016-09-08 23:35:11
言語 Java21
(openjdk 21)
結果
AC  
実行時間 116 ms / 5,000 ms
コード長 243 bytes
コンパイル時間 3,239 ms
コンパイル使用メモリ 74,688 KB
実行使用メモリ 54,288 KB
最終ジャッジ日時 2024-04-27 18:06:56
合計ジャッジ時間 6,319 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 102 ms
52,556 KB
testcase_01 AC 110 ms
53,568 KB
testcase_02 AC 110 ms
53,668 KB
testcase_03 AC 107 ms
53,000 KB
testcase_04 AC 97 ms
52,956 KB
testcase_05 AC 98 ms
52,884 KB
testcase_06 AC 108 ms
53,800 KB
testcase_07 AC 97 ms
52,296 KB
testcase_08 AC 116 ms
53,996 KB
testcase_09 AC 102 ms
52,780 KB
testcase_10 AC 113 ms
54,020 KB
testcase_11 AC 109 ms
53,884 KB
testcase_12 AC 108 ms
53,564 KB
testcase_13 AC 106 ms
53,856 KB
testcase_14 AC 102 ms
54,288 KB
testcase_15 AC 109 ms
53,896 KB
testcase_16 AC 107 ms
54,044 KB
testcase_17 AC 111 ms
53,936 KB
testcase_18 AC 98 ms
52,560 KB
testcase_19 AC 94 ms
52,236 KB
testcase_20 AC 107 ms
53,776 KB
testcase_21 AC 115 ms
54,264 KB
testcase_22 AC 107 ms
53,856 KB
testcase_23 AC 109 ms
53,984 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Test {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int a = 1, b = sc.nextInt(), cnt = 0;
		while (a < b) {
			a *= 2;
			cnt++;
		}
		System.out.println(cnt);
	}
}
0