結果
問題 |
No.380 悪の台本
|
ユーザー |
![]() |
提出日時 | 2017-01-31 22:13:16 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 651 bytes |
コンパイル時間 | 87 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 16,000 KB |
最終ジャッジ日時 | 2024-11-06 23:21:58 |
合計ジャッジ時間 | 3,741 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 1 TLE * 1 |
other | WA * 1 RE * 1 TLE * 1 -- * 5 |
ソースコード
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)