結果

問題 No.253 ロウソクの長さ
ユーザー 37zigen
提出日時 2016-03-22 16:54:17
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 412 bytes
コンパイル時間 2,284 ms
コンパイル使用メモリ 76,400 KB
実行使用メモリ 71,864 KB
平均クエリ数 16.72
最終ジャッジ日時 2024-07-16 08:49:56
合計ジャッジ時間 12,740 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14 WA * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder253;
import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		System.out.println("?100	");
		int a=sc.nextInt();
		int count=0;
		if(a==-1){
			for(int i=0;i<100;i++){
				System.out.println("?0");
				count++;
				int b=sc.nextInt();
				if(b==0){
					System.out.println("!"+count);
					System.exit(0);
				}
			}
		}
	}
}
0