結果

問題 No.380 悪の台本
ユーザー ynyn
提出日時 2016-06-17 23:56:45
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 1,814 bytes
コンパイル時間 178 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 66,048 KB
最終ジャッジ日時 2024-04-24 14:23:52
合計ジャッジ時間 1,337 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 WA -
testcase_02 AC 42 ms
51,968 KB
testcase_03 AC 42 ms
52,224 KB
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 WA -
testcase_08 WA -
testcase_09 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
alp = [[chr(i) for i in range(65,65+26)], [chr(i) for i in range(97,97+26)]]

digi = ["nyo","Nyo","nYo","nyO","NYo","nYO","NyO","NYO"]
petit = ["nyu","Nyu","nYu","nyU","NYu","nYU","NyU","NYU"]
gema = ["gema","Gema","gEma","geMa","gemA","GEma","GeMa","GemA","gEMa","gEmA","geMA","GEMa","GEmA","GeMA","gEMA","GEMA"]
piyo = ["pyo","Pyo","pYo","pyO","PYo","pYO","PyO","PYO"]

for line in sys.stdin:
    if len(line) < 2:
        exit()
    s = line
    ss = s.split()
    fdigi = True
    fpetit = True
    fgem = True
    fpiyo = True
    frabi = True

    if len(s) < 6:
        print("WRONG!")
        continue

    if ss[0] == "digi":
        for i in range(3):
            if s[i-6:i-3] in digi:
                print("CORRECT (maybe)")
                fdigi = False
                break
        if fdigi:
            print("WRONG!")

    elif ss[0] == "petit":
        for i in range(3):
            if s[i-6:i-3] in petit:
                print("CORRECT (maybe)")
                fpetit = False
                break
        if fpetit:
            print("WRONG!")

    elif ss[0] == "gema":
        for i in range(3):
            if s[i-6:i-3] in gema:
                print("CORRECT (maybe)")
                fgema = False
                break
        if fgema:
            print("WRONG!")

    elif ss[0] == "piyo":
        for i in range(3):
            if s[i-6:i-3] in piyo:
                print("CORRECT (maybe)")
                fpiyo = False
                break
        if fpiyo:
            print("WRONG!")

    else:
        cnt = 0
        for S in s:
            if S.isalpha():
                cnt += 1
                if cnt > 4:
                    print("CORRECT (maybe)")
                    frabi = False
                    break
        if frabi:
            print("WRONG!")
0