結果

問題 No.380 悪の台本
ユーザー niyarinniyarin
提出日時 2016-07-05 18:18:53
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 618 bytes
コンパイル時間 53 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 7,936 KB
最終ジャッジ日時 2024-04-24 14:39:15
合計ジャッジ時間 752 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
6,144 KB
testcase_01 WA -
testcase_02 AC 11 ms
6,144 KB
testcase_03 AC 13 ms
6,144 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 17 ms
7,936 KB
testcase_09 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import re

nyrn = {a:re.compile(".*"+b+"[!-/:-@[-`{-~]{0,3}",re.IGNORECASE) 
        for a,b in [("digi","nyo"),("petit","nyu"),("gema","gema"),("piyo","pyo")]}

while 1:
    try:
        a = raw_input().split(" ")
        x = a[0]
        y = a[1:]
        s = y[-1]
        flag = True
        if x == "rabi":
            if not (re.match("[!-/:-@[-`{-~]",s)):
                flag = False
        else:
            rm = re.match(nyrn[x],s)
            if not(rm and rm.group() == s):
                flag = False

        print "CORRECT (maybe)" if flag else "WRONG!"
    except:
        break

        



        
0