結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー jimanojimano
提出日時 2015-12-27 17:38:40
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 292 bytes
コンパイル時間 3,466 ms
コンパイル使用メモリ 74,280 KB
実行使用メモリ 57,700 KB
最終ジャッジ日時 2023-10-19 11:16:26
合計ジャッジ時間 7,801 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 139 ms
57,436 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 136 ms
57,440 KB
testcase_04 AC 136 ms
57,288 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 141 ms
57,676 KB
testcase_08 AC 141 ms
57,700 KB
testcase_09 AC 142 ms
57,104 KB
testcase_10 AC 138 ms
57,668 KB
testcase_11 AC 139 ms
57,548 KB
testcase_12 AC 141 ms
57,440 KB
testcase_13 AC 136 ms
57,152 KB
testcase_14 AC 136 ms
57,148 KB
testcase_15 AC 137 ms
57,096 KB
testcase_16 AC 136 ms
57,260 KB
testcase_17 AC 138 ms
57,432 KB
testcase_18 AC 141 ms
57,156 KB
testcase_19 AC 141 ms
57,224 KB
testcase_20 AC 138 ms
57,444 KB
testcase_21 AC 138 ms
57,356 KB
testcase_22 AC 140 ms
57,680 KB
testcase_23 AC 136 ms
57,364 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package lv1;
import java.util.Scanner;

public class No56 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int cnt = 1;
		int result = 0;
		
		while(cnt <= N){
			cnt = cnt * 2;
			result++;
		}
		
		System.out.println(result);
	}
}
0