結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー tentententen
提出日時 2020-11-05 08:36:06
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 5,000 ms
コード長 272 bytes
コンパイル時間 1,897 ms
コンパイル使用メモリ 70,936 KB
実行使用メモリ 56,604 KB
最終ジャッジ日時 2023-09-29 16:43:58
合計ジャッジ時間 6,260 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,820 KB
testcase_01 AC 118 ms
56,044 KB
testcase_02 AC 118 ms
56,604 KB
testcase_03 AC 117 ms
56,336 KB
testcase_04 AC 118 ms
56,088 KB
testcase_05 AC 118 ms
55,924 KB
testcase_06 AC 118 ms
56,048 KB
testcase_07 AC 119 ms
56,044 KB
testcase_08 AC 119 ms
55,676 KB
testcase_09 AC 119 ms
56,380 KB
testcase_10 AC 121 ms
56,328 KB
testcase_11 AC 121 ms
56,164 KB
testcase_12 AC 123 ms
56,040 KB
testcase_13 AC 120 ms
55,732 KB
testcase_14 AC 121 ms
55,960 KB
testcase_15 AC 120 ms
56,028 KB
testcase_16 AC 122 ms
56,208 KB
testcase_17 AC 122 ms
56,020 KB
testcase_18 AC 122 ms
55,536 KB
testcase_19 AC 124 ms
55,964 KB
testcase_20 AC 124 ms
55,536 KB
testcase_21 AC 120 ms
55,416 KB
testcase_22 AC 121 ms
56,088 KB
testcase_23 AC 121 ms
56,180 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 count = 0;
		int bits = 1;
		while (n > bits) {
		    bits <<= 1;
		    count++;
		}
		System.out.println(count);
	}
}
0