結果
| 問題 |
No.380 悪の台本
|
| コンテスト | |
| ユーザー |
torus711
|
| 提出日時 | 2016-06-17 23:53:31 |
| 言語 | Ruby (3.4.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 437 bytes |
| コンパイル時間 | 115 ms |
| コンパイル使用メモリ | 7,424 KB |
| 実行使用メモリ | 19,456 KB |
| 最終ジャッジ日時 | 2024-11-06 22:45:55 |
| 合計ジャッジ時間 | 1,910 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 3 WA * 5 |
コンパイルメッセージ
Syntax OK
ソースコード
regexps = [
/^digi .*nyo[^a-zA-Z0-9 ]{0,3}$/,
/^petit .*nyu[^a-zA-Z0-9 ]{0,3}$/,
/^rabi .*[a-zA-Z0-9].*$/,
/^gema .*gema[^a-zA-Z0-9 ]{0,3}$/,
/^piyo .*pyo[^a-zA-Z0-9 ]{0,3}$/ ]
while s = gets
if ![ "digi", "petit", "rabi", "gema", "piyo" ].include?( s.split[0] )
puts "WRONG!"
next
end
s.downcase!
cnt = 0
regexps.each do |reg|
if s =~ reg
cnt += 1
end
end
puts ( cnt == 1 ? "CORRECT (maybe)" : "WRONG!" )
end
torus711