結果

問題 No.1187 皇帝ペンギン
ユーザー tailstails
提出日時 2020-08-22 17:10:12
言語 Perl
(5.38.2)
結果
AC  
実行時間 31 ms / 1,000 ms
コード長 192 bytes
コンパイル時間 239 ms
コンパイル使用メモリ 5,216 KB
実行使用メモリ 24,396 KB
平均クエリ数 16.44
最終ジャッジ日時 2023-09-24 06:16:52
合計ジャッジ時間 4,723 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
23,772 KB
testcase_01 AC 27 ms
23,368 KB
testcase_02 AC 27 ms
24,148 KB
testcase_03 AC 28 ms
23,404 KB
testcase_04 AC 28 ms
24,040 KB
testcase_05 AC 28 ms
23,764 KB
testcase_06 AC 28 ms
23,596 KB
testcase_07 AC 28 ms
23,596 KB
testcase_08 AC 27 ms
24,040 KB
testcase_09 AC 27 ms
24,208 KB
testcase_10 AC 27 ms
24,232 KB
testcase_11 AC 27 ms
24,396 KB
testcase_12 AC 28 ms
24,028 KB
testcase_13 AC 28 ms
23,512 KB
testcase_14 AC 29 ms
23,344 KB
testcase_15 AC 28 ms
23,356 KB
testcase_16 AC 28 ms
23,620 KB
testcase_17 AC 28 ms
24,028 KB
testcase_18 AC 28 ms
23,332 KB
testcase_19 AC 27 ms
23,524 KB
testcase_20 AC 27 ms
23,656 KB
testcase_21 AC 27 ms
23,944 KB
testcase_22 AC 27 ms
24,244 KB
testcase_23 AC 29 ms
24,016 KB
testcase_24 AC 28 ms
23,776 KB
testcase_25 AC 27 ms
23,524 KB
testcase_26 AC 28 ms
23,524 KB
testcase_27 AC 27 ms
23,488 KB
testcase_28 AC 27 ms
23,548 KB
testcase_29 AC 27 ms
23,764 KB
testcase_30 AC 27 ms
24,244 KB
testcase_31 AC 27 ms
23,572 KB
testcase_32 AC 27 ms
23,332 KB
testcase_33 AC 28 ms
23,404 KB
testcase_34 AC 27 ms
23,380 KB
testcase_35 AC 27 ms
23,356 KB
testcase_36 AC 27 ms
23,944 KB
testcase_37 AC 27 ms
23,332 KB
testcase_38 AC 27 ms
23,560 KB
testcase_39 AC 27 ms
23,380 KB
testcase_40 AC 27 ms
24,040 KB
testcase_41 AC 27 ms
23,608 KB
testcase_42 AC 27 ms
23,988 KB
testcase_43 AC 27 ms
23,340 KB
testcase_44 AC 26 ms
23,520 KB
testcase_45 AC 27 ms
23,568 KB
testcase_46 AC 26 ms
23,340 KB
testcase_47 AC 27 ms
23,404 KB
testcase_48 AC 27 ms
23,524 KB
testcase_49 AC 28 ms
23,980 KB
testcase_50 AC 27 ms
23,560 KB
testcase_51 AC 27 ms
23,368 KB
testcase_52 AC 26 ms
23,560 KB
testcase_53 AC 27 ms
23,968 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Unquoted string "out" may clash with future reserved word at Main.pl line 7.
Unquoted string "out" may clash with future reserved word at Main.pl line 10.
Main.pl syntax OK

ソースコード

diff #

$|=1;
$a=0;
$b=1001;
while($a<$b-1){
	$c=$a+$b>>1;
	print"? $c\n";
	if(<>=~out){
		++$c;
		print"? $c\n";
		if(<>=~out){
			$b=$c-1;
		}else{
			$a=$c;
		}
	}else{
		$a=$c;
	}
}
print"! $a\n"
0