結果
問題 | No.380 悪の台本 |
ユーザー | Mr.Fuku |
提出日時 | 2018-07-22 11:47:37 |
言語 | Python3 (3.11.6 + numpy 1.26.0 + scipy 1.11.3) |
結果 |
AC
|
実行時間 | 111 ms / 1,000 ms |
コード長 | 685 bytes |
コンパイル時間 | 154 ms |
コンパイル使用メモリ | 10,732 KB |
実行使用メモリ | 10,188 KB |
最終ジャッジ日時 | 2023-08-27 00:51:52 |
合計ジャッジ時間 | 1,472 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge14 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 23 ms
8,908 KB |
testcase_01 | AC | 23 ms
8,988 KB |
testcase_02 | AC | 23 ms
8,968 KB |
testcase_03 | AC | 24 ms
8,988 KB |
testcase_04 | AC | 29 ms
8,968 KB |
testcase_05 | AC | 51 ms
9,068 KB |
testcase_06 | AC | 50 ms
9,016 KB |
testcase_07 | AC | 111 ms
9,028 KB |
testcase_08 | AC | 40 ms
10,188 KB |
testcase_09 | AC | 34 ms
9,092 KB |
ソースコード
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!")