結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー rf141rf141
提出日時 2015-08-06 20:57:06
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 5,000 ms
コード長 316 bytes
コンパイル時間 5,950 ms
コンパイル使用メモリ 72,044 KB
実行使用メモリ 56,212 KB
最終ジャッジ日時 2023-09-25 04:15:58
合計ジャッジ時間 7,400 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
56,092 KB
testcase_01 AC 123 ms
55,948 KB
testcase_02 AC 124 ms
55,940 KB
testcase_03 AC 123 ms
55,896 KB
testcase_04 AC 124 ms
56,016 KB
testcase_05 AC 122 ms
55,808 KB
testcase_06 AC 121 ms
55,572 KB
testcase_07 AC 122 ms
55,552 KB
testcase_08 AC 122 ms
55,788 KB
testcase_09 AC 123 ms
56,056 KB
testcase_10 AC 123 ms
56,212 KB
testcase_11 AC 122 ms
56,044 KB
testcase_12 AC 121 ms
56,036 KB
testcase_13 AC 122 ms
55,752 KB
testcase_14 AC 125 ms
55,872 KB
testcase_15 AC 125 ms
55,904 KB
testcase_16 AC 122 ms
55,756 KB
testcase_17 AC 122 ms
55,496 KB
testcase_18 AC 122 ms
55,880 KB
testcase_19 AC 122 ms
55,956 KB
testcase_20 AC 123 ms
55,972 KB
testcase_21 AC 120 ms
55,708 KB
testcase_22 AC 124 ms
55,756 KB
testcase_23 AC 119 ms
55,684 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Biscuits{
	public static void main(String... args){
		Scanner scan = new Scanner(System.in);
		double n = scan.nextInt();
		System.out.println(clap(n));
	}
	public static int clap(double n){
		int count = 0;
		while(n > 1){
			n = Math.ceil(n/2);
			count++;
		}
		return count;
	}
}
0