結果

問題 No.253 ロウソクの長さ
ユーザー tailstails
提出日時 2015-07-24 23:59:08
言語 Perl
(5.38.2)
結果
AC  
実行時間 31 ms / 2,000 ms
コード長 206 bytes
コンパイル時間 517 ms
コンパイル使用メモリ 5,220 KB
実行使用メモリ 24,408 KB
平均クエリ数 37.17
最終ジャッジ日時 2023-09-23 21:00:25
合計ジャッジ時間 3,578 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
23,656 KB
testcase_01 AC 28 ms
23,664 KB
testcase_02 AC 29 ms
23,676 KB
testcase_03 AC 29 ms
23,448 KB
testcase_04 AC 28 ms
23,676 KB
testcase_05 AC 29 ms
23,640 KB
testcase_06 AC 28 ms
24,264 KB
testcase_07 AC 28 ms
23,676 KB
testcase_08 AC 28 ms
23,592 KB
testcase_09 AC 28 ms
23,640 KB
testcase_10 AC 29 ms
23,664 KB
testcase_11 AC 28 ms
23,400 KB
testcase_12 AC 27 ms
23,664 KB
testcase_13 AC 28 ms
24,060 KB
testcase_14 AC 28 ms
23,448 KB
testcase_15 AC 30 ms
24,072 KB
testcase_16 AC 28 ms
23,640 KB
testcase_17 AC 30 ms
23,844 KB
testcase_18 AC 28 ms
24,084 KB
testcase_19 AC 28 ms
23,844 KB
testcase_20 AC 28 ms
23,436 KB
testcase_21 AC 29 ms
24,048 KB
testcase_22 AC 28 ms
23,868 KB
testcase_23 AC 28 ms
24,084 KB
testcase_24 AC 29 ms
23,676 KB
testcase_25 AC 28 ms
24,312 KB
testcase_26 AC 27 ms
24,036 KB
testcase_27 AC 28 ms
23,688 KB
testcase_28 AC 28 ms
24,060 KB
testcase_29 AC 28 ms
24,312 KB
testcase_30 AC 28 ms
24,024 KB
testcase_31 AC 29 ms
23,664 KB
testcase_32 AC 28 ms
23,676 KB
testcase_33 AC 27 ms
23,688 KB
testcase_34 AC 27 ms
24,408 KB
testcase_35 AC 28 ms
23,676 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Unquoted string "say" may clash with future reserved word at Main.pl line 1.
Main.pl syntax OK

ソースコード

diff #

use feature say;
$|=1;
say"? 100";++$n;
if(<><1){
	do{
		say"? 1";++$n;
	}while<>>0;
	say"! ",$n;
}else{
	$a=100;
	$b=1e9+1;
	while($a<$b-1){
		say"? ",($c=$a+$b>>1)-$n++;
		<><0?$b:$a=$c;
	}
	say"! ",$a;
}
0