結果
| 問題 |
No.47 ポケットを叩くとビスケットが2倍
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-06-12 08:03:39 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 319 bytes |
| コンパイル時間 | 2,112 ms |
| コンパイル使用メモリ | 74,180 KB |
| 実行使用メモリ | 54,292 KB |
| 最終ジャッジ日時 | 2024-09-24 16:41:50 |
| 合計ジャッジ時間 | 5,487 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 WA * 1 |
ソースコード
import java.util.*;
class PocketAndBiscuits {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int cnt = 0;
int biscuits = 1;
while (true) {
cnt++;
if (biscuits * 2 >= n) {
break;
}
biscuits += biscuits;
}
System.out.println(cnt);
}
}