結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー kou6839kou6839
提出日時 2014-11-19 00:21:16
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 5,000 ms
コード長 263 bytes
コンパイル時間 2,200 ms
コンパイル使用メモリ 71,724 KB
実行使用メモリ 57,892 KB
最終ジャッジ日時 2023-08-30 21:46:44
合計ジャッジ時間 6,484 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,948 KB
testcase_01 AC 119 ms
55,948 KB
testcase_02 AC 117 ms
56,088 KB
testcase_03 AC 118 ms
55,616 KB
testcase_04 AC 120 ms
55,832 KB
testcase_05 AC 122 ms
55,928 KB
testcase_06 AC 120 ms
56,168 KB
testcase_07 AC 120 ms
55,680 KB
testcase_08 AC 119 ms
55,788 KB
testcase_09 AC 120 ms
56,048 KB
testcase_10 AC 119 ms
57,892 KB
testcase_11 AC 121 ms
56,076 KB
testcase_12 AC 123 ms
55,516 KB
testcase_13 AC 122 ms
55,884 KB
testcase_14 AC 121 ms
55,608 KB
testcase_15 AC 118 ms
55,508 KB
testcase_16 AC 121 ms
55,800 KB
testcase_17 AC 120 ms
55,828 KB
testcase_18 AC 118 ms
55,708 KB
testcase_19 AC 118 ms
55,492 KB
testcase_20 AC 123 ms
56,156 KB
testcase_21 AC 123 ms
55,524 KB
testcase_22 AC 117 ms
55,816 KB
testcase_23 AC 118 ms
55,832 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
 

public class Main {

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