結果

問題 No.380 悪の台本
コンテスト
ユーザー nebukuro09
提出日時 2016-10-06 11:38:36
言語 PyPy2
(7.3.15)
結果
RE  
実行時間 -
コード長 712 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 379 ms
コンパイル使用メモリ 77,112 KB
最終ジャッジ日時 2025-12-03 21:54:38
ジャッジサーバーID
(参考情報)
judge2 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 2 WA * 3 RE * 3
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import re
import fileinput
C = set(['digi', 'petit', 'rabi', 'gema', 'piyo'])

for line in fileinput.input():
    name, line = line.rstrip('\n').split(' ', 1)
    line = line.lower()
    if not name in C:
        print 'WRONG!'
    if name == 'digi' and re.search('nyo\W{0,3}$', line):
        print 'CORRECT (maybe)'
    elif name == 'petit' and re.search('nyu\W{0,3}$', line):
        print 'CORRECT (maybe)'
    elif name == 'rabi' and re.search('\w', line):
        print 'CORRECT (maybe)'
    elif name == 'gema' and re.search('gema\W{0,3}$', line):
        print 'CORRECT (maybe)'
    elif name == 'digi' and re.search('pyo\W{0,3}$', line):
        print 'CORRECT (maybe)'
    else:
        print 'WRONG!'
0