結果

問題 No.380 悪の台本
ユーザー HaarHaar
提出日時 2016-06-17 23:05:07
言語 Ruby
(3.3.0)
結果
RE  
実行時間 -
コード長 610 bytes
コンパイル時間 40 ms
コンパイル使用メモリ 7,296 KB
実行使用メモリ 19,456 KB
最終ジャッジ日時 2024-04-24 14:18:58
合計ジャッジ時間 1,651 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
12,032 KB
testcase_01 RE -
testcase_02 AC 89 ms
12,288 KB
testcase_03 AC 85 ms
12,160 KB
testcase_04 AC 92 ms
12,160 KB
testcase_05 AC 105 ms
12,288 KB
testcase_06 WA -
testcase_07 RE -
testcase_08 AC 90 ms
19,456 KB
testcase_09 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

while str = gets do
	str = str.match(/(\w+) (.*)/)
	case str[1]
	when "digi" then
		if /nyo[^a-zA-Z0-9]{0,3}$/i =~ str[2] then puts "CORRECT (maybe)" else puts "WRONG!" end
	when "petit" then
		if /nyu[^a-zA-Z0-9]{0,3}$/i =~ str[2] then puts "CORRECT (maybe)" else puts "WRONG!" end
	when "rabi" then
		if /[a-zA-Z0-9]/i =~ str[2] then puts "CORRECT (maybe)" else puts "WRONG!" end
	when "gema" then
		if /gema[^a-zA-Z0-9]{0,3}$/i =~ str[2] then puts "CORRECT (maybe)" else puts "WRONG!" end
	when "piyo" then
		if /pyo[^a-zA-Z0-9]{0,3}$/i =~ str[2] then puts "CORRECT (maybe)" else puts "WRONG!" end
	end
end
0