結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー barrett114514
提出日時 2017-07-23 21:16:17
言語 Java
(openjdk 23)
結果
AC  
実行時間 136 ms / 5,000 ms
コード長 344 bytes
コンパイル時間 3,318 ms
コンパイル使用メモリ 74,396 KB
実行使用メモリ 41,528 KB
最終ジャッジ日時 2024-10-09 11:04:42
合計ジャッジ時間 7,088 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class BiscuitsBeDoubled {

	public static void main(String[] args) {

		int biscuits = 1;

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();

		for (int i = 0;;) {

			
			if(biscuits >= N){
				System.out.println(i);
				break;
			}else{
				biscuits = biscuits * 2;
				 i++;
			}
		}
		

	}

}
0