結果
問題 |
No.380 悪の台本
|
ユーザー |
|
提出日時 | 2016-06-17 23:05:07 |
言語 | Ruby (3.4.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 610 bytes |
コンパイル時間 | 54 ms |
コンパイル使用メモリ | 7,680 KB |
実行使用メモリ | 19,456 KB |
最終ジャッジ日時 | 2024-11-06 22:40:54 |
合計ジャッジ時間 | 1,679 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 4 WA * 1 RE * 3 |
コンパイルメッセージ
Syntax OK
ソースコード
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