結果
| 問題 |
No.47 ポケットを叩くとビスケットが2倍
|
| コンテスト | |
| ユーザー |
sasakki
|
| 提出日時 | 2016-04-08 15:26:30 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 136 ms / 5,000 ms |
| コード長 | 394 bytes |
| コンパイル時間 | 2,408 ms |
| コンパイル使用メモリ | 73,828 KB |
| 実行使用メモリ | 54,172 KB |
| 最終ジャッジ日時 | 2024-10-04 04:49:59 |
| 合計ジャッジ時間 | 6,472 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
import java.util.Scanner;
class no47{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int N = Integer.parseInt(sc.next());
int biscuits = 1;
int num = 0;
while(true){
if( biscuits == N){
break;
}
else if( biscuits * 2 <= N ){
biscuits *= 2;
num++;
}
else{
num++;
break;
}
}
System.out.println(num);
}
}
sasakki