結果

問題 No.380 悪の台本
ユーザー kotatsugamekotatsugame
提出日時 2019-10-12 17:24:52
言語 Perl
(5.38.2)
結果
AC  
実行時間 111 ms / 1,000 ms
コード長 424 bytes
コンパイル時間 521 ms
コンパイル使用メモリ 5,208 KB
実行使用メモリ 19,900 KB
最終ジャッジ日時 2023-08-18 23:44:19
合計ジャッジ時間 1,230 ms
ジャッジサーバーID
(参考情報)
judge9 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,672 KB
testcase_01 AC 2 ms
4,852 KB
testcase_02 AC 3 ms
4,836 KB
testcase_03 AC 3 ms
4,668 KB
testcase_04 AC 6 ms
4,980 KB
testcase_05 AC 18 ms
5,824 KB
testcase_06 AC 17 ms
5,828 KB
testcase_07 AC 111 ms
19,900 KB
testcase_08 AC 3 ms
4,944 KB
testcase_09 AC 7 ms
5,008 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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