結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー yu_017
提出日時 2019-02-02 23:34:15
言語 Java
(openjdk 23)
結果
AC  
実行時間 120 ms / 5,000 ms
コード長 264 bytes
コンパイル時間 4,107 ms
コンパイル使用メモリ 73,832 KB
実行使用メモリ 41,284 KB
最終ジャッジ日時 2024-11-29 20:41:30
合計ジャッジ時間 7,877 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class A000047 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int x = sc.nextInt();
		sc.close();
		int r = 0;
		int s = 1;
		while(x-s>0) {
			r++;
			s*=2;
		}

		System.out.println(r);
	}
}
0