結果

問題 No.380 悪の台本
ユーザー finefine
提出日時 2016-06-18 00:24:45
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 973 bytes
コンパイル時間 42 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 12,544 KB
最終ジャッジ日時 2024-04-24 14:27:41
合計ジャッジ時間 1,561 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
12,160 KB
testcase_01 WA -
testcase_02 AC 73 ms
12,160 KB
testcase_03 AC 78 ms
12,288 KB
testcase_04 AC 84 ms
12,544 KB
testcase_05 AC 99 ms
12,416 KB
testcase_06 AC 91 ms
12,416 KB
testcase_07 AC 179 ms
12,288 KB
testcase_08 AC 79 ms
12,288 KB
testcase_09 AC 85 ms
12,288 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

while s = gets
    s = s.chomp.split
    case s[0]
    when "digi"
        s = s[1..-1].join.downcase
        if s =~ /nyo[^a-zA-Z0-9]{0,3}$/
            puts "CORRECT (maybe)"
        else
            puts "WRONG!"
        end
    when "petit"
        s = s[1..-1].join.downcase
        if s =~ /nyu[^a-zA-Z0-9]{0,3}$/
            puts "CORRECT (maybe)"
        else
            puts "WRONG!"
        end
    when "rabi"
        s = s[1..-1].join.downcase
        if s =~ /[a-zA-Z0-9].*$/
            puts "CORRECT (maybe)"
        else
            puts "WRONG!"
        end
    when "gema"
        s = s[1..-1].join.downcase
        if s =~ /gema[^a-zA-Z0-9]{0,3}$/
            puts "CORRECT (maybe)"
        else
            puts "WRONG!"
        end
    when "piyo"
        s = s[1..-1].join.downcase
        if s =~ /pyo[^a-zA-Z0-9]{0,3}$/
            puts "CORRECT (maybe)"
        else
            puts "WRONG!"
        end
    else
        puts "WRONG!"
    end
end
0