結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー Koketti1Koketti1
提出日時 2017-02-04 17:02:06
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 279 bytes
コンパイル時間 2,150 ms
コンパイル使用メモリ 71,340 KB
実行使用メモリ 58,556 KB
最終ジャッジ日時 2023-08-25 20:12:29
合計ジャッジ時間 6,194 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,640 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 120 ms
55,908 KB
testcase_04 AC 121 ms
57,992 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 120 ms
55,800 KB
testcase_08 AC 119 ms
55,540 KB
testcase_09 AC 121 ms
55,780 KB
testcase_10 AC 122 ms
54,036 KB
testcase_11 AC 122 ms
55,740 KB
testcase_12 AC 121 ms
56,264 KB
testcase_13 AC 121 ms
56,388 KB
testcase_14 AC 121 ms
55,880 KB
testcase_15 AC 121 ms
55,836 KB
testcase_16 AC 122 ms
55,892 KB
testcase_17 AC 123 ms
55,876 KB
testcase_18 AC 122 ms
55,616 KB
testcase_19 AC 122 ms
55,996 KB
testcase_20 AC 122 ms
56,108 KB
testcase_21 AC 121 ms
56,272 KB
testcase_22 AC 122 ms
56,076 KB
testcase_23 AC 122 ms
55,732 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner scanner = new Scanner(System.in);
		int A = scanner.nextInt();
		int ans = 0;
		
		while(A/2 != 0){
			A = A/2;
			ans++;
		}
		
		System.out.println(ans+1);
		scanner.close();
	}
}
0