結果

問題 No.380 悪の台本
ユーザー finefine
提出日時 2016-06-17 22:44:35
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 967 bytes
コンパイル時間 36 ms
コンパイル使用メモリ 7,296 KB
実行使用メモリ 12,544 KB
最終ジャッジ日時 2024-04-24 14:14:33
合計ジャッジ時間 1,627 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
12,160 KB
testcase_01 WA -
testcase_02 AC 79 ms
12,032 KB
testcase_03 AC 77 ms
12,160 KB
testcase_04 AC 87 ms
12,544 KB
testcase_05 AC 102 ms
12,288 KB
testcase_06 AC 103 ms
12,288 KB
testcase_07 AC 184 ms
12,288 KB
testcase_08 AC 78 ms
12,032 KB
testcase_09 AC 88 ms
12,160 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]{,3}$/
            puts "CORRECT (maybe)"
        else
            puts "WRONG!"
        end
    when "petit"
        s = s[1..-1].join.downcase
        if s =~ /nyu[^a-zA-Z0-9]{,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]{,3}$/
            puts "CORRECT (maybe)"
        else
            puts "WRONG!"
        end
    when "piyo"
        s = s[1..-1].join.downcase
        if s =~ /pyo[^a-zA-Z0-9]{,3}$/
            puts "CORRECT (maybe)"
        else
            puts "WRONG!"
        end
    else
        puts "WRONG!"
    end
end
0