結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー カニ戯(ryカニ戯(ry
提出日時 2015-02-26 14:24:44
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 5,000 ms
コード長 219 bytes
コンパイル時間 1,916 ms
コンパイル使用メモリ 71,692 KB
実行使用メモリ 56,636 KB
最終ジャッジ日時 2023-09-06 05:02:52
合計ジャッジ時間 6,199 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,808 KB
testcase_01 AC 121 ms
56,012 KB
testcase_02 AC 120 ms
54,608 KB
testcase_03 AC 121 ms
55,804 KB
testcase_04 AC 118 ms
55,868 KB
testcase_05 AC 124 ms
55,948 KB
testcase_06 AC 123 ms
55,852 KB
testcase_07 AC 124 ms
53,916 KB
testcase_08 AC 123 ms
55,532 KB
testcase_09 AC 120 ms
55,928 KB
testcase_10 AC 122 ms
56,636 KB
testcase_11 AC 123 ms
55,528 KB
testcase_12 AC 121 ms
56,004 KB
testcase_13 AC 120 ms
55,776 KB
testcase_14 AC 121 ms
55,796 KB
testcase_15 AC 123 ms
55,724 KB
testcase_16 AC 119 ms
55,664 KB
testcase_17 AC 122 ms
55,736 KB
testcase_18 AC 120 ms
55,952 KB
testcase_19 AC 120 ms
55,524 KB
testcase_20 AC 120 ms
55,680 KB
testcase_21 AC 124 ms
55,728 KB
testcase_22 AC 121 ms
55,968 KB
testcase_23 AC 123 ms
55,896 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;


public class Main {
	public static void main(String[] a) {
		String S=Integer.toBinaryString(new Scanner(System.in).nextInt());
		System.out.println(S.length()-(S.matches("^10*$")?1:0));
	}
}
0