結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー Tsukasa_Type
提出日時 2018-02-12 22:05:34
言語 Java
(openjdk 23)
結果
AC  
実行時間 139 ms / 5,000 ms
コード長 278 bytes
コンパイル時間 2,059 ms
コンパイル使用メモリ 75,176 KB
実行使用メモリ 56,124 KB
最終ジャッジ日時 2024-11-25 11:55:49
合計ジャッジ時間 6,225 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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