結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー hnthnt
提出日時 2016-04-10 19:21:04
言語 Java21
(openjdk 21)
結果
AC  
実行時間 132 ms / 5,000 ms
コード長 333 bytes
コンパイル時間 2,991 ms
コンパイル使用メモリ 77,276 KB
実行使用メモリ 54,360 KB
最終ジャッジ日時 2024-04-14 23:51:26
合計ジャッジ時間 6,896 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
53,972 KB
testcase_01 AC 127 ms
53,948 KB
testcase_02 AC 125 ms
54,116 KB
testcase_03 AC 121 ms
54,360 KB
testcase_04 AC 124 ms
54,236 KB
testcase_05 AC 120 ms
53,964 KB
testcase_06 AC 130 ms
54,132 KB
testcase_07 AC 123 ms
54,100 KB
testcase_08 AC 132 ms
54,164 KB
testcase_09 AC 124 ms
54,264 KB
testcase_10 AC 119 ms
53,912 KB
testcase_11 AC 126 ms
54,340 KB
testcase_12 AC 122 ms
54,180 KB
testcase_13 AC 122 ms
54,076 KB
testcase_14 AC 121 ms
54,244 KB
testcase_15 AC 125 ms
54,276 KB
testcase_16 AC 132 ms
54,232 KB
testcase_17 AC 125 ms
54,296 KB
testcase_18 AC 124 ms
53,972 KB
testcase_19 AC 122 ms
54,000 KB
testcase_20 AC 125 ms
54,104 KB
testcase_21 AC 121 ms
53,848 KB
testcase_22 AC 127 ms
53,964 KB
testcase_23 AC 126 ms
54,220 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;


public class no47 {

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

}
0