結果
| 問題 |
No.47 ポケットを叩くとビスケットが2倍
|
| コンテスト | |
| ユーザー |
FpmpAmpm
|
| 提出日時 | 2016-10-22 13:08:05 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 132 ms / 5,000 ms |
| コード長 | 482 bytes |
| コンパイル時間 | 3,262 ms |
| コンパイル使用メモリ | 74,672 KB |
| 実行使用メモリ | 41,612 KB |
| 最終ジャッジ日時 | 2024-11-23 17:06:00 |
| 合計ジャッジ時間 | 5,884 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
public static void main (String[] args) throws java.lang.Exception
{
// your code goes here
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
String N = Integer.toBinaryString(n);
System.out.println(((n & (n-1)) == 0) ? N.length() - 1 : N.length());
}
}
FpmpAmpm