結果

問題 No.517 壊れたアクセサリー
ユーザー tailstails
提出日時 2017-05-28 23:48:12
言語 Perl
(5.38.2)
結果
CE  
(最新)
AC  
(最初)
実行時間 -
コード長 202 bytes
コンパイル時間 32 ms
コンパイル使用メモリ 6,812 KB
最終ジャッジ日時 2024-04-27 02:26:04
合計ジャッジ時間 418 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。

コンパイルメッセージ
Unquoted string "a" may clash with future reserved word at Main.pl line 1.
Unquoted string "b" may clash with future reserved word at Main.pl line 1.
Scalar found where operator expected (Missing operator before "$x"?) at Main.pl line 16, near "s///for$x"
Unknown regexp modifier "/f" at Main.pl line 16, near ""
syntax error at Main.pl line 16, near "s///for$x"
Main.pl had compilation errors.

ソースコード

diff #

for$v(a,b){
	for(1..<>){
		$_=<>;
		chop;
		/./;
		$$v{$&}=$_;
	}
}
@c=grep$a{$_},keys%b;
exit!print-1if$#c;
$x=$a{"@c"};
$y=$b{"@c"};
while($_=$x.$y){
	/./;
	print$&;
	s///for$x||=$a{$&},$y||=$b{$&};
}
0