結果

問題 No.305 鍵(2)
コンテスト
ユーザー 👑 tails
提出日時 2015-11-27 22:39:52
言語 Perl
(5.42.1)
コンパイル:
perl -cw _filename_
実行:
perl -X _filename_
結果
WA  
実行時間 -
コード長 218 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 195 ms
コンパイル使用メモリ 5,888 KB
実行使用メモリ 6,016 KB
平均クエリ数 53.54
最終ジャッジ日時 2026-08-13 18:35:50
合計ジャッジ時間 2,536 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 2 WA * 11
権限があれば一括ダウンロードができます
コンパイルメッセージ
Unquoted string "u" may clash with future reserved word at Main.pl line 4.
Unquoted string "u" may clash with future reserved word at Main.pl line 10.
Main.pl syntax OK

ソースコード

diff #
raw source code

$|=1;
print 0 x10,$/;
$r=<>;
exit if$r=~u;

for$a(0..9){
	for$d(0..9){
		print'0'x$a,$d,'0'x(9-$a),$/;
		$s=<>;
		exit if$s=~u;
		if($r>$s){
			$a.=0;
			last;
		}
		if($r<$s){
			$a.=$d;
			last;
		}
	}
}
print $a,$/;
0