結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー yuma_shobon1108yuma_shobon1108
提出日時 2016-11-11 13:36:31
言語 Java21
(openjdk 21)
結果
AC  
実行時間 109 ms / 5,000 ms
コード長 279 bytes
コンパイル時間 2,642 ms
コンパイル使用メモリ 71,660 KB
実行使用メモリ 56,416 KB
最終ジャッジ日時 2023-08-16 18:33:20
合計ジャッジ時間 6,567 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 106 ms
54,344 KB
testcase_01 AC 109 ms
56,292 KB
testcase_02 AC 107 ms
55,676 KB
testcase_03 AC 106 ms
56,072 KB
testcase_04 AC 105 ms
55,988 KB
testcase_05 AC 107 ms
56,416 KB
testcase_06 AC 105 ms
56,416 KB
testcase_07 AC 107 ms
55,988 KB
testcase_08 AC 106 ms
56,000 KB
testcase_09 AC 108 ms
56,048 KB
testcase_10 AC 104 ms
56,008 KB
testcase_11 AC 107 ms
55,436 KB
testcase_12 AC 105 ms
55,752 KB
testcase_13 AC 106 ms
56,184 KB
testcase_14 AC 107 ms
55,964 KB
testcase_15 AC 105 ms
55,624 KB
testcase_16 AC 105 ms
56,024 KB
testcase_17 AC 104 ms
56,240 KB
testcase_18 AC 103 ms
55,688 KB
testcase_19 AC 106 ms
56,104 KB
testcase_20 AC 105 ms
56,064 KB
testcase_21 AC 103 ms
55,480 KB
testcase_22 AC 109 ms
56,196 KB
testcase_23 AC 104 ms
55,760 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Question047
{
	public static void main(String[] args)
	{
	
		Scanner scan = new Scanner(System.in);
		
		int n = scan.nextInt();
		int pow = 1;
		int cnt = 0;
		for(cnt=0; pow<n; cnt++){
			pow = pow * 2;
		}
		
		System.out.println(cnt);		
	}
}
0