結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー jp_stejp_ste
提出日時 2016-03-02 22:14:00
言語 Java21
(openjdk 21)
結果
AC  
実行時間 140 ms / 5,000 ms
コード長 304 bytes
コンパイル時間 4,203 ms
コンパイル使用メモリ 74,292 KB
実行使用メモリ 57,584 KB
最終ジャッジ日時 2023-10-24 19:34:23
合計ジャッジ時間 8,512 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 135 ms
57,584 KB
testcase_01 AC 134 ms
57,356 KB
testcase_02 AC 132 ms
57,388 KB
testcase_03 AC 133 ms
57,384 KB
testcase_04 AC 135 ms
57,456 KB
testcase_05 AC 133 ms
57,336 KB
testcase_06 AC 131 ms
57,292 KB
testcase_07 AC 132 ms
57,472 KB
testcase_08 AC 133 ms
57,504 KB
testcase_09 AC 132 ms
57,396 KB
testcase_10 AC 133 ms
57,272 KB
testcase_11 AC 133 ms
57,356 KB
testcase_12 AC 140 ms
57,016 KB
testcase_13 AC 133 ms
57,516 KB
testcase_14 AC 132 ms
57,544 KB
testcase_15 AC 133 ms
57,516 KB
testcase_16 AC 132 ms
57,356 KB
testcase_17 AC 131 ms
57,396 KB
testcase_18 AC 132 ms
57,312 KB
testcase_19 AC 130 ms
57,268 KB
testcase_20 AC 132 ms
57,312 KB
testcase_21 AC 132 ms
57,364 KB
testcase_22 AC 132 ms
57,392 KB
testcase_23 AC 132 ms
57,428 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner scan = new Scanner(System.in)) {
            long N = scan.nextInt();
            int ans = (int)Math.ceil(Math.log(N) / Math.log(2.0));
            System.out.println(ans);
        }
    }
}
0