結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー mura40424mura40424
提出日時 2014-11-23 18:30:00
言語 Java21
(openjdk 21)
結果
AC  
実行時間 120 ms / 5,000 ms
コード長 279 bytes
コンパイル時間 3,107 ms
コンパイル使用メモリ 73,068 KB
実行使用メモリ 58,124 KB
最終ジャッジ日時 2023-08-30 22:21:06
合計ジャッジ時間 7,070 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
55,984 KB
testcase_01 AC 117 ms
56,144 KB
testcase_02 AC 118 ms
56,320 KB
testcase_03 AC 117 ms
56,036 KB
testcase_04 AC 119 ms
55,700 KB
testcase_05 AC 118 ms
56,048 KB
testcase_06 AC 118 ms
55,896 KB
testcase_07 AC 118 ms
56,264 KB
testcase_08 AC 116 ms
58,124 KB
testcase_09 AC 117 ms
55,768 KB
testcase_10 AC 119 ms
56,420 KB
testcase_11 AC 119 ms
55,724 KB
testcase_12 AC 117 ms
56,176 KB
testcase_13 AC 117 ms
56,216 KB
testcase_14 AC 117 ms
56,144 KB
testcase_15 AC 117 ms
55,764 KB
testcase_16 AC 119 ms
55,816 KB
testcase_17 AC 116 ms
55,944 KB
testcase_18 AC 118 ms
54,276 KB
testcase_19 AC 116 ms
56,060 KB
testcase_20 AC 111 ms
56,128 KB
testcase_21 AC 120 ms
55,744 KB
testcase_22 AC 115 ms
56,120 KB
testcase_23 AC 119 ms
56,000 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class CopyOfMain {
	public static void main(String[] args){
		Scanner S = new Scanner(System.in);
		int N = S.nextInt();
		
		if(N==1)
			System.out.println(0);
		else
			System.out.println(Integer.toBinaryString(N-1).length());
	}
}
0