結果
| 問題 | No.47 ポケットを叩くとビスケットが2倍 |
| コンテスト | |
| ユーザー |
sasakki
|
| 提出日時 | 2016-04-08 15:26:30 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 91 ms / 5,000 ms |
| コード長 | 394 bytes |
| 記録 | |
| コンパイル時間 | 2,299 ms |
| コンパイル使用メモリ | 82,284 KB |
| 実行使用メモリ | 42,556 KB |
| 最終ジャッジ日時 | 2026-04-20 02:39:52 |
| 合計ジャッジ時間 | 4,467 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
import java.util.Scanner;
class no47{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int N = Integer.parseInt(sc.next());
int biscuits = 1;
int num = 0;
while(true){
if( biscuits == N){
break;
}
else if( biscuits * 2 <= N ){
biscuits *= 2;
num++;
}
else{
num++;
break;
}
}
System.out.println(num);
}
}
sasakki