結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー 🐧しゅんチャマ🌸🐧しゅんチャマ🌸
提出日時 2023-09-06 23:22:40
言語 Java21
(openjdk 21)
結果
AC  
実行時間 146 ms / 5,000 ms
コード長 304 bytes
コンパイル時間 2,204 ms
コンパイル使用メモリ 71,356 KB
実行使用メモリ 56,172 KB
最終ジャッジ日時 2023-09-06 23:22:47
合計ジャッジ時間 6,900 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 135 ms
55,804 KB
testcase_01 AC 130 ms
55,928 KB
testcase_02 AC 146 ms
55,600 KB
testcase_03 AC 131 ms
55,860 KB
testcase_04 AC 130 ms
55,932 KB
testcase_05 AC 129 ms
55,928 KB
testcase_06 AC 127 ms
56,048 KB
testcase_07 AC 127 ms
56,008 KB
testcase_08 AC 132 ms
56,032 KB
testcase_09 AC 130 ms
55,732 KB
testcase_10 AC 138 ms
55,892 KB
testcase_11 AC 132 ms
55,852 KB
testcase_12 AC 140 ms
55,792 KB
testcase_13 AC 134 ms
55,900 KB
testcase_14 AC 137 ms
55,876 KB
testcase_15 AC 129 ms
56,172 KB
testcase_16 AC 131 ms
55,992 KB
testcase_17 AC 133 ms
56,076 KB
testcase_18 AC 136 ms
55,848 KB
testcase_19 AC 133 ms
55,840 KB
testcase_20 AC 131 ms
55,928 KB
testcase_21 AC 134 ms
56,120 KB
testcase_22 AC 128 ms
55,580 KB
testcase_23 AC 133 ms
55,792 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main{
    public static void main(String args[]){
        Scanner sc=new Scanner(System.in);
        int N=sc.nextInt();
        int count=0;
        int b=1;
        while(N>b){
            count++;
            b=b*2;
        }
        System.out.println(count);
    }
}
0