結果
問題 |
No.47 ポケットを叩くとビスケットが2倍
|
ユーザー |
![]() |
提出日時 | 2017-07-23 21:11:40 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 331 bytes |
コンパイル時間 | 3,364 ms |
コンパイル使用メモリ | 74,672 KB |
実行使用メモリ | 54,204 KB |
最終ジャッジ日時 | 2024-10-09 11:04:19 |
合計ジャッジ時間 | 7,429 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 WA * 1 |
ソースコード
import java.util.Scanner; public class BiscuitsBeDoubled { public static void main(String[] args) { int biscuits = 1; Scanner sc = new Scanner(System.in); int N = sc.nextInt(); for (int i = 0; biscuits <N;) { biscuits = biscuits * 2; i++; if(biscuits >= N){ System.out.println(i); } } } }