結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー len_proglen_prog
提出日時 2016-06-08 09:49:34
言語 Java21
(openjdk 21)
結果
AC  
実行時間 131 ms / 5,000 ms
コード長 342 bytes
コンパイル時間 2,075 ms
コンパイル使用メモリ 74,084 KB
実行使用メモリ 54,260 KB
最終ジャッジ日時 2024-04-17 09:36:47
合計ジャッジ時間 5,959 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
54,008 KB
testcase_01 AC 126 ms
54,180 KB
testcase_02 AC 123 ms
53,996 KB
testcase_03 AC 125 ms
53,896 KB
testcase_04 AC 127 ms
54,072 KB
testcase_05 AC 128 ms
54,224 KB
testcase_06 AC 113 ms
53,092 KB
testcase_07 AC 127 ms
53,888 KB
testcase_08 AC 123 ms
53,852 KB
testcase_09 AC 115 ms
53,000 KB
testcase_10 AC 124 ms
54,144 KB
testcase_11 AC 127 ms
54,140 KB
testcase_12 AC 124 ms
54,192 KB
testcase_13 AC 124 ms
54,056 KB
testcase_14 AC 124 ms
54,056 KB
testcase_15 AC 127 ms
54,060 KB
testcase_16 AC 126 ms
53,828 KB
testcase_17 AC 125 ms
54,124 KB
testcase_18 AC 128 ms
54,048 KB
testcase_19 AC 115 ms
53,028 KB
testcase_20 AC 125 ms
54,260 KB
testcase_21 AC 123 ms
54,184 KB
testcase_22 AC 114 ms
53,128 KB
testcase_23 AC 131 ms
54,000 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int biscuitAmount = 1;
		int bisucuitCount = 0;

		while(biscuitAmount < N){
			biscuitAmount *= 2;
			bisucuitCount++;
		}

		System.out.println(bisucuitCount);
		scan.close();
	}

}
0