結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー mos_13184925mos_13184925
提出日時 2018-06-30 12:20:19
言語 Java21
(openjdk 21)
結果
AC  
実行時間 121 ms / 5,000 ms
コード長 262 bytes
コンパイル時間 2,413 ms
コンパイル使用メモリ 71,728 KB
実行使用メモリ 56,632 KB
最終ジャッジ日時 2023-09-13 16:16:12
合計ジャッジ時間 6,431 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,764 KB
testcase_01 AC 120 ms
55,888 KB
testcase_02 AC 119 ms
55,984 KB
testcase_03 AC 120 ms
55,468 KB
testcase_04 AC 118 ms
55,924 KB
testcase_05 AC 118 ms
56,184 KB
testcase_06 AC 120 ms
56,432 KB
testcase_07 AC 119 ms
55,888 KB
testcase_08 AC 120 ms
56,632 KB
testcase_09 AC 119 ms
56,172 KB
testcase_10 AC 119 ms
56,404 KB
testcase_11 AC 120 ms
55,996 KB
testcase_12 AC 119 ms
55,700 KB
testcase_13 AC 120 ms
56,300 KB
testcase_14 AC 121 ms
55,848 KB
testcase_15 AC 120 ms
55,464 KB
testcase_16 AC 120 ms
56,352 KB
testcase_17 AC 121 ms
56,476 KB
testcase_18 AC 121 ms
56,096 KB
testcase_19 AC 119 ms
56,328 KB
testcase_20 AC 120 ms
55,656 KB
testcase_21 AC 121 ms
55,592 KB
testcase_22 AC 118 ms
55,500 KB
testcase_23 AC 118 ms
56,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int ans = 0;
        for(int i=1; i<n; i*=2) ans++;
        System.out.println(ans);
    }
}
0