結果

問題 No.380 悪の台本
ユーザー nebukuro09nebukuro09
提出日時 2016-10-06 11:41:33
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 785 bytes
コンパイル時間 58 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2024-04-24 14:49:10
合計ジャッジ時間 887 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

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

for line in fileinput.input():
    a = line.rstrip('\n').split(' ', 1)
    if len(a) < 2:
        print 'WRONG!'
        continue
    name, line = a
    line = line[-1].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