結果
| 問題 |
No.47 ポケットを叩くとビスケットが2倍
|
| ユーザー |
barrett114514
|
| 提出日時 | 2017-07-23 21:12:28 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 363 bytes |
| コンパイル時間 | 3,219 ms |
| コンパイル使用メモリ | 74,264 KB |
| 実行使用メモリ | 41,416 KB |
| 最終ジャッジ日時 | 2024-10-09 11:04:28 |
| 合計ジャッジ時間 | 7,078 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 21 |
ソースコード
package yukiCoder;
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;) {
if(biscuits >= N){
System.out.println(i);
}else{
biscuits = biscuits * 2;
i++;
}
}
}
}
barrett114514