結果
| 問題 | No.47 ポケットを叩くとビスケットが2倍 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-10-10 20:20:05 |
| 言語 | Java (openjdk 26.0.2.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 57 ms / 5,000 ms |
| + 303µs | |
| コード長 | 526 bytes |
| 記録 | |
| コンパイル時間 | 1,329 ms |
| コンパイル使用メモリ | 85,464 KB |
| 実行使用メモリ | 42,676 KB |
| 最終ジャッジ日時 | 2026-09-14 23:39:54 |
| 合計ジャッジ時間 | 4,294 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// 標準入力から読み込む際に、Scannerオブジェクトを使う。
Scanner sc = new Scanner(System.in);
// int 1つ分を読み込む
int n = sc.nextInt();
int biscuits = 1;
int count = 0;
while(biscuits < n){
biscuits = biscuits * 2;
count++;
}
// 標準出力に書き出す。
System.out.println(count);
}
}