結果
| 問題 |
No.380 悪の台本
|
| コンテスト | |
| ユーザー |
torus711
|
| 提出日時 | 2016-06-17 23:47:39 |
| 言語 | Ruby (3.4.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 444 bytes |
| コンパイル時間 | 324 ms |
| コンパイル使用メモリ | 7,424 KB |
| 実行使用メモリ | 19,584 KB |
| 最終ジャッジ日時 | 2024-11-06 22:44:45 |
| 合計ジャッジ時間 | 2,005 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 7 WA * 1 |
コンパイルメッセージ
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
s.strip!
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