結果

問題 No.380 悪の台本
ユーザー purupuru
提出日時 2016-06-17 23:07:07
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 659 bytes
コンパイル時間 76 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 8,192 KB
最終ジャッジ日時 2024-04-24 14:19:12
合計ジャッジ時間 974 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

# coding: utf-8

import sys
import re

for line in sys.stdin:
    tokens = line.split(" ")
    
    who = tokens[0]
    talk = " ".join(tokens[1:]).lower()
    
    ok = False
    if who == "digi":
        if "nyo" in talk[-7:]:
            ok = True
    elif who == "petit":
        if "nyu" in talk[-7:]:
            ok = True
    elif who == "rabi":
        if re.match(r"[a-z0-9]", talk):
            ok = True
    elif who == "gema":
        if "gema" in talk[-8:]:
            ok = True
    elif who == "piyo":
        if "pyo" in talk[-7:]:
            ok = True
    
    if ok:
        print("CORRECT (maybe)");
    else:
        print("WRONG!");
    
0