結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー uafr_csuafr_cs
提出日時 2015-05-14 19:31:58
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 5,000 ms
コード長 346 bytes
コンパイル時間 2,011 ms
コンパイル使用メモリ 71,828 KB
実行使用メモリ 56,240 KB
最終ジャッジ日時 2023-09-20 07:49:56
合計ジャッジ時間 6,177 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
56,076 KB
testcase_01 AC 127 ms
55,988 KB
testcase_02 AC 126 ms
55,780 KB
testcase_03 AC 127 ms
55,464 KB
testcase_04 AC 127 ms
55,456 KB
testcase_05 AC 127 ms
55,980 KB
testcase_06 AC 126 ms
55,940 KB
testcase_07 AC 125 ms
53,636 KB
testcase_08 AC 126 ms
55,952 KB
testcase_09 AC 126 ms
56,016 KB
testcase_10 AC 125 ms
55,656 KB
testcase_11 AC 125 ms
55,620 KB
testcase_12 AC 126 ms
55,520 KB
testcase_13 AC 124 ms
55,816 KB
testcase_14 AC 125 ms
55,804 KB
testcase_15 AC 125 ms
56,240 KB
testcase_16 AC 127 ms
55,824 KB
testcase_17 AC 126 ms
55,792 KB
testcase_18 AC 129 ms
53,480 KB
testcase_19 AC 127 ms
55,528 KB
testcase_20 AC 125 ms
55,756 KB
testcase_21 AC 124 ms
55,780 KB
testcase_22 AC 123 ms
55,624 KB
testcase_23 AC 125 ms
55,820 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.LinkedList;
import java.util.Scanner;

public class Main {
	
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		final int N = sc.nextInt();
		
		System.out.println(Integer.numberOfTrailingZeros(Integer.highestOneBit(N)) + (Integer.highestOneBit(N) != N ? 1 : 0));
	}
	
}
0