結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー fkwnw3_1243fkwnw3_1243
提出日時 2017-04-23 21:24:27
言語 Java21
(openjdk 21)
結果
AC  
実行時間 42 ms / 5,000 ms
コード長 488 bytes
コンパイル時間 1,632 ms
コンパイル使用メモリ 71,040 KB
実行使用メモリ 49,436 KB
最終ジャッジ日時 2023-09-29 16:02:22
合計ジャッジ時間 3,927 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
49,392 KB
testcase_01 AC 37 ms
49,216 KB
testcase_02 AC 38 ms
49,256 KB
testcase_03 AC 37 ms
49,024 KB
testcase_04 AC 37 ms
49,112 KB
testcase_05 AC 37 ms
49,436 KB
testcase_06 AC 38 ms
49,116 KB
testcase_07 AC 37 ms
49,140 KB
testcase_08 AC 38 ms
49,328 KB
testcase_09 AC 38 ms
49,216 KB
testcase_10 AC 37 ms
49,072 KB
testcase_11 AC 38 ms
48,996 KB
testcase_12 AC 38 ms
49,280 KB
testcase_13 AC 37 ms
49,044 KB
testcase_14 AC 42 ms
49,040 KB
testcase_15 AC 39 ms
48,976 KB
testcase_16 AC 36 ms
49,172 KB
testcase_17 AC 40 ms
49,196 KB
testcase_18 AC 39 ms
49,048 KB
testcase_19 AC 38 ms
49,076 KB
testcase_20 AC 38 ms
49,104 KB
testcase_21 AC 38 ms
48,976 KB
testcase_22 AC 37 ms
49,192 KB
testcase_23 AC 36 ms
49,032 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        int N = Integer.parseInt(reader.readLine());
        int i = 1;
        int counter = 0;
        while (i < N) {
            i = i * 2;
            counter+=1;
        }
        System.out.println(counter);

    }
}
0