結果

問題 No.380 悪の台本
ユーザー kotatsugame
提出日時 2019-10-12 17:23:13
言語 Perl
(5.40.0)
結果
WA  
実行時間 -
コード長 425 bytes
コンパイル時間 345 ms
コンパイル使用メモリ 6,692 KB
実行使用メモリ 20,608 KB
最終ジャッジ日時 2024-11-28 10:26:22
合計ジャッジ時間 1,577 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 7 WA * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
Unquoted string "digi" may clash with future reserved word at Main.pl line 7.
Unquoted string "petit" may clash with future reserved word at Main.pl line 10.
Unquoted string "rabi" may clash with future reserved word at Main.pl line 13.
Unquoted string "gema" may clash with future reserved word at Main.pl line 16.
Unquoted string "piyo" may clash with future reserved word at Main.pl line 19.
Main.pl syntax OK

ソースコード

diff #

for(<>){
	$ans="CORRECT (maybe)";
	$out="WRONG!";
	s/^\w+ //;
	$a=$&;
	$a=~s/ $//;
	if($a eq digi){
		$ans=$out if!/nyo[^a-zA-Z0-9]{0,3}$/i
	}
	elsif($a eq petit){
		$ans=$out if!/nyu[^a-zA-Z0-9]{0,3}$/i
	}
	elsif($a eq rabi){
		$ans=$out if!/[^a-zA-Z0-9]/
	}
	elsif($a eq gema){
		$ans=$out if!/gema[^a-zA-Z0-9]{0,3}$/i
	}
	elsif($a eq piyo){
		$ans=$out if!/pyo[^a-zA-Z0-9]{0,3}$/i
	}
	else{
		$ans=$out
	}
	print$ans,$/
}
0