結果
問題 |
No.380 悪の台本
|
ユーザー |
![]() |
提出日時 | 2018-07-22 11:47:37 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 147 ms / 1,000 ms |
コード長 | 685 bytes |
コンパイル時間 | 399 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 11,648 KB |
最終ジャッジ日時 | 2024-12-26 05:11:27 |
合計ジャッジ時間 | 1,683 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 8 |
ソースコード
import sys,re scenario = {"nyo":"digi","nyu":"petit","gema":"gema","pyo":"piyo"} for line in sys.stdin: if line[0]==" ": print("WRONG!") continue line = line.split(" ",1) if len(line)<2: print("WRONG!") continue name = line[0] gobi = line[1][:-1].lower() gobi = gobi[:-3] + re.sub('[^a-z0-9]', "", gobi[-3:]) if name=="rabi": print("CORRECT (maybe)" if len(re.sub("[^a-z0-9]","",gobi))>=1 else "WRONG!") elif name=="gema"==gobi[-4:]: print("CORRECT (maybe)") elif gobi[-3:] in scenario: print("CORRECT (maybe)" if scenario[gobi[-3:]]==name else "WRONG!") else: print("WRONG!")