結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー gmvalentino8gmvalentino8
提出日時 2014-11-23 17:30:42
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 5,000 ms
コード長 257 bytes
コンパイル時間 3,324 ms
コンパイル使用メモリ 72,020 KB
実行使用メモリ 56,548 KB
最終ジャッジ日時 2023-08-30 22:19:33
合計ジャッジ時間 7,581 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,668 KB
testcase_01 AC 120 ms
55,760 KB
testcase_02 AC 120 ms
55,616 KB
testcase_03 AC 120 ms
55,708 KB
testcase_04 AC 126 ms
55,820 KB
testcase_05 AC 120 ms
55,560 KB
testcase_06 AC 120 ms
55,700 KB
testcase_07 AC 120 ms
55,644 KB
testcase_08 AC 120 ms
55,644 KB
testcase_09 AC 121 ms
55,904 KB
testcase_10 AC 122 ms
55,560 KB
testcase_11 AC 127 ms
55,712 KB
testcase_12 AC 121 ms
55,544 KB
testcase_13 AC 120 ms
55,556 KB
testcase_14 AC 121 ms
55,748 KB
testcase_15 AC 121 ms
55,916 KB
testcase_16 AC 121 ms
56,076 KB
testcase_17 AC 121 ms
56,020 KB
testcase_18 AC 120 ms
55,784 KB
testcase_19 AC 122 ms
56,548 KB
testcase_20 AC 119 ms
55,748 KB
testcase_21 AC 120 ms
55,552 KB
testcase_22 AC 120 ms
55,568 KB
testcase_23 AC 120 ms
56,120 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Exercise {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
	    int n = sc.nextInt();
	    double a = Math.log(n)/Math.log(2);
	    System.out.print((int)Math.ceil(a));
	}
}
0