結果
| 問題 |
No.380 悪の台本
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-06-17 22:52:33 |
| 言語 | Ruby (3.4.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 995 bytes |
| コンパイル時間 | 103 ms |
| コンパイル使用メモリ | 7,424 KB |
| 実行使用メモリ | 12,416 KB |
| 最終ジャッジ日時 | 2024-11-06 22:37:58 |
| 合計ジャッジ時間 | 1,876 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 7 RE * 1 |
コンパイルメッセージ
Syntax OK
ソースコード
while s = gets
s = s.chomp
idx = s.index(' ')
case s[0...idx]
when "digi"
s = s[(idx+1)..-1].downcase
if s =~ /nyo[^a-zA-Z0-9]{,3}$/
puts "CORRECT (maybe)"
else
puts "WRONG!"
end
when "petit"
s = s[(idx+1)..-1].downcase
if s =~ /nyu[^a-zA-Z0-9]{,3}$/
puts "CORRECT (maybe)"
else
puts "WRONG!"
end
when "rabi"
s = s[(idx+1)..-1].downcase
if s =~ /[a-zA-Z0-9]+/
puts "CORRECT (maybe)"
else
puts "WRONG!"
end
when "gema"
s = s[(idx+1)..-1].downcase
if s =~ /gema[^a-zA-Z0-9]{,3}$/
puts "CORRECT (maybe)"
else
puts "WRONG!"
end
when "piyo"
s = s[(idx+1)..-1].downcase
if s =~ /pyo[^a-zA-Z0-9]{,3}$/
puts "CORRECT (maybe)"
else
puts "WRONG!"
end
else
puts "WRONG!"
end
end