結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー hideohideo
提出日時 2017-06-07 18:18:12
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 5,000 ms
コード長 408 bytes
コンパイル時間 1,920 ms
コンパイル使用メモリ 74,184 KB
実行使用メモリ 57,448 KB
最終ジャッジ日時 2023-10-23 18:58:56
合計ジャッジ時間 6,151 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
57,440 KB
testcase_01 AC 116 ms
56,116 KB
testcase_02 AC 129 ms
57,252 KB
testcase_03 AC 127 ms
57,428 KB
testcase_04 AC 126 ms
57,288 KB
testcase_05 AC 128 ms
57,132 KB
testcase_06 AC 125 ms
57,140 KB
testcase_07 AC 126 ms
57,336 KB
testcase_08 AC 129 ms
57,440 KB
testcase_09 AC 126 ms
57,416 KB
testcase_10 AC 126 ms
57,392 KB
testcase_11 AC 114 ms
56,136 KB
testcase_12 AC 116 ms
56,192 KB
testcase_13 AC 127 ms
57,296 KB
testcase_14 AC 126 ms
57,364 KB
testcase_15 AC 126 ms
57,448 KB
testcase_16 AC 125 ms
57,168 KB
testcase_17 AC 128 ms
57,412 KB
testcase_18 AC 127 ms
57,240 KB
testcase_19 AC 117 ms
55,984 KB
testcase_20 AC 129 ms
56,976 KB
testcase_21 AC 127 ms
56,976 KB
testcase_22 AC 121 ms
55,940 KB
testcase_23 AC 126 ms
57,120 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;
public class Main {
    public static void main(String[] args) throws Exception {
        
         Scanner s = new Scanner(System.in);
        int X = s.nextInt();
       int num = 0;
		int i = 0;
		while(true){
			num = (int)Math.pow(2 , i);
			if(num >= X){
				System.out.println(i);
				break;
			}
			i++;
		}
    }
}
0