結果
| 問題 | No.380 悪の台本 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-07-05 18:18:53 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 618 bytes |
| 記録 | |
| コンパイル時間 | 181 ms |
| コンパイル使用メモリ | 77,496 KB |
| 最終ジャッジ日時 | 2025-12-03 20:54:56 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 2 WA * 6 |
ソースコード
import re
nyrn = {a:re.compile(".*"+b+"[!-/:-@[-`{-~]{0,3}",re.IGNORECASE)
for a,b in [("digi","nyo"),("petit","nyu"),("gema","gema"),("piyo","pyo")]}
while 1:
try:
a = raw_input().split(" ")
x = a[0]
y = a[1:]
s = y[-1]
flag = True
if x == "rabi":
if not (re.match("[!-/:-@[-`{-~]",s)):
flag = False
else:
rm = re.match(nyrn[x],s)
if not(rm and rm.group() == s):
flag = False
print "CORRECT (maybe)" if flag else "WRONG!"
except:
break