結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー econo_coffee
提出日時 2017-03-12 23:30:54
言語 Java
(openjdk 23)
結果
AC  
実行時間 132 ms / 5,000 ms
コード長 352 bytes
コンパイル時間 3,723 ms
コンパイル使用メモリ 74,344 KB
実行使用メモリ 44,484 KB
最終ジャッジ日時 2024-06-30 00:36:30
合計ジャッジ時間 7,931 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Yukicoder {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int biscuit = 1;
        int count = 0;
        while (N > biscuit) {
            biscuit *= 2;
            count++;
        }

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