結果
| 問題 |
No.380 悪の台本
|
| コンテスト | |
| ユーザー |
ldsyb
|
| 提出日時 | 2016-06-18 00:05:04 |
| 言語 | Ruby (3.4.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 753 bytes |
| コンパイル時間 | 74 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 12,416 KB |
| 最終ジャッジ日時 | 2024-11-06 22:49:01 |
| 合計ジャッジ時間 | 1,819 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | WA * 8 |
コンパイルメッセージ
Syntax OK
ソースコード
while s = gets
s = s.split(' ')
case s[0]
when "digi"
if s[s.size - 1] =~ /.*nyo[\W_]{0,3}/i
puts "CORRECT (maybe)"
else
puts "WRONG!"
end
when "petit"
if s[s.size - 1] =~ /.*nyu[\W_]{0,3}/i
puts "CORRECT (maybe)"
else
puts "WRONG!"
end
when "rabi"
f = false
(1...s.size).each do |i|
f = true if s[i] =~ /.*[a-zA-Z]+.*/
end
if f
puts "CORRECT (maybe)"
else
puts "WRONG!"
end
when "gema"
f = true
(1...s.size).each do |i|
f = false if s[i] =~ /.*gema[\W_]{0,3}/i
end
if f
puts "CORRECT (maybe)"
else
puts "WRONG!"
end
else
f = true
(1...s.size).each do |i|
f = false if s[i] =~ /.*pyo[\W_]{0,3}/i
end
if f
puts "CORRECT (maybe)"
else
puts "WRONG!"
end
end
end
ldsyb