結果

問題 No.381 名声値を稼ごう Extra
ユーザー vorg101vorg101
提出日時 2016-06-18 00:18:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 808 bytes
コンパイル時間 202 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 12,416 KB
最終ジャッジ日時 2024-04-17 23:59:51
合計ジャッジ時間 600 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import string
import sys
L = sys.stdin.readlines()
phrase = {'digi': 'nyo', 'petit': 'nyu', 'gema': 'gema', 'piyo': 'pyo'}
for l in L:
    flag = False
    name, serif = l.split(' ')[0], ' '.join(l.split(' ')[1:]).lower()
    if name in ['digi', 'petit', 'gema', 'piyo', 'rabi']:
        for n, f in phrase.items():
            length = len(f)
            if name == n and f in serif[-length-4:]:
                t = ''.join(list(filter(lambda c: c in string.ascii_letters, serif[-length-4:])))
                if t[-length:] == f:
                    flag = True
            else:
                continue
        if name == 'rabi' and len(list(filter(lambda c: c in string.ascii_letters, serif))) != 0:
            flag = True
    if flag:
        print('CORRECT (maybe)')
    else:
        print('WRONG!')
0