結果
| 問題 |
No.47 ポケットを叩くとビスケットが2倍
|
| コンテスト | |
| ユーザー |
aparachia14
|
| 提出日時 | 2016-01-18 22:48:39 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 740 bytes |
| コンパイル時間 | 5,166 ms |
| コンパイル使用メモリ | 74,676 KB |
| 実行使用メモリ | 50,412 KB |
| 最終ジャッジ日時 | 2024-09-21 07:58:24 |
| 合計ジャッジ時間 | 6,793 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 19 WA * 2 |
ソースコード
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
//No.47 ポケットを叩くとビスケットが2倍
public class TwiceBiscuit {
public static void main(String[] args) throws IOException {
// TODO 自動生成されたメソッド・スタブ
//食べたいビスケットの枚数
int want;
//ビスケットの枚数
int biscuit = 1;
//カウンタ
int counter = 0;
//入力受け取り
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
want = Integer.parseInt(in.readLine());
while(true){
biscuit = biscuit * 2;
if(biscuit > want){
break;
}else{
}
counter++;
}
System.out.println(++counter);
}
}
aparachia14