結果

問題 No.380 悪の台本
ユーザー kurenai3110kurenai3110
提出日時 2017-01-31 22:13:16
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 651 bytes
コンパイル時間 106 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 15,872 KB
最終ジャッジ日時 2024-04-24 14:55:01
合計ジャッジ時間 3,726 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import re

di = re.compile(r'^digi ([^ ]+.*)*(n|N)(y|Y)(o|O)[^a-zA-Z0-9]{0,3}$')
pe = re.compile(r'^petit ([^ ]+.*)*(n|N)(y|Y)(u|U)[^a-zA-Z0-9]{0,3}$')
ra = re.compile(r'^rabi ([^ ]+.*)*[a-zA-Z0-9]+.*$')
ge = re.compile(r'^gema ([^ ]+.*)*(g|G)(e|E)(m|M)(a|A)[^a-zA-Z0-9]{0,3}$')
pi = re.compile(r'^piyo ([^ ]+.*)*(p|P)(y|Y)(o|O)[^a-zA-Z0-9]{0,3}$')

AC='CORRECT (maybe)'
WG='WRONG!'

def solve(s):
    if re.search(di,s) or re.search(pe,s) or re.search(ra,s) or re.search(ge,s) or re.search(pi,s):
        return True
    return False

while 1:
    s=input()
    if s=='':
        break

    if solve(s):
        print(AC)
    else:
        print(WG)
0