結果
問題 | No.380 悪の台本 |
ユーザー | xkumiyu |
提出日時 | 2018-06-15 21:30:37 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 612 bytes |
コンパイル時間 | 631 ms |
コンパイル使用メモリ | 10,640 KB |
実行使用メモリ | 9,328 KB |
最終ジャッジ日時 | 2023-09-13 04:44:21 |
合計ジャッジ時間 | 2,034 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 27 ms
9,216 KB |
testcase_01 | RE | - |
testcase_02 | AC | 25 ms
9,156 KB |
testcase_03 | AC | 27 ms
9,084 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | RE | - |
testcase_08 | AC | 28 ms
9,328 KB |
testcase_09 | WA | - |
ソースコード
import re ptn = { 'digi': re.compile('(n|N)(y|Y)(o|O)[!-/:-@[-`{-~]{0,3}$'), 'petit': re.compile('(n|N)(y|Y)(u|U)[!-/:-@[-`{-~]{0,3}$'), 'rabi': re.compile('\w'), 'gema': re.compile('(g|G)(e|E)(m|M)(a|A)[!-/:-@[-`{-~]{0,3}$'), 'piyo': re.compile('(p|P)(y|Y)(o|O)[!-/:-@[-`{-~]{0,3}$') } def check(s): s = s.split() if s[0] in ptn.keys() and ptn[s[0]].search(' '.join(s[1:])): return True else: return False try: while True: if check(input()): print('CORRECT (maybe)') else: print('WRONG!') except EOFError: pass