結果
| 問題 | No.380 悪の台本 |
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2026-02-12 05:53:27 |
| 言語 | Python3 (3.14.3 + numpy 2.4.2 + scipy 1.17.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 2,040 bytes |
| 記録 | |
| コンパイル時間 | 816 ms |
| コンパイル使用メモリ | 20,828 KB |
| 実行使用メモリ | 20,696 KB |
| 最終ジャッジ日時 | 2026-02-12 05:53:32 |
| 合計ジャッジ時間 | 5,047 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 2 WA * 4 RE * 2 |
ソースコード
D=dict()
D["digi"]="nyo"
D["petit"]="nyu"
D["rabi"]=""
D["gema"]="gema"
D["piyo"]="pyo"
ALPHA="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
while True:
try:
S=input().strip()
except:
break
if S[:4]=="digi":
flag=0
if S[-3:].lower()=="nyo":
flag=1
if S[-4:-1].lower()=="nyo" and S[-1] not in ALPHA:
flag=1
if S[-5:-2].lower()=="nyo" and S[-1] not in ALPHA and S[-2] not in ALPHA:
flag=1
if S[-6:-3].lower()=="nyo" and S[-1] not in ALPHA and S[-2] not in ALPHA and S[-3] not in ALPHA:
flag=1
elif S[:5]=="petit":
if S[-3:].lower()=="nyu":
flag=1
if S[-4:-1].lower()=="nyu" and S[-1] not in ALPHA:
flag=1
if S[-5:-2].lower()=="nyu" and S[-1] not in ALPHA and S[-2] not in ALPHA:
flag=1
if S[-6:-3].lower()=="nyu" and S[-1] not in ALPHA and S[-2] not in ALPHA and S[-3] not in ALPHA:
flag=1
elif S[:4]=="gema":
if S[-4:].lower()=="gema":
flag=1
if S[-5:-1].lower()=="gema" and S[-1] not in ALPHA:
flag=1
if S[-6:-2].lower()=="gema" and S[-1] not in ALPHA and S[-2] not in ALPHA:
flag=1
if S[-7:-3].lower()=="gema" and S[-1] not in ALPHA and S[-2] not in ALPHA and S[-3] not in ALPHA:
flag=1
elif S[:4]=="piyo":
if S[-3:].lower()=="pyo":
flag=1
if S[-4:-1].lower()=="pyo" and S[-1] not in ALPHA:
flag=1
if S[-5:-2].lower()=="pyo" and S[-1] not in ALPHA and S[-2] not in ALPHA:
flag=1
if S[-6:-3].lower()=="pyo" and S[-1] not in ALPHA and S[-2] not in ALPHA and S[-3] not in ALPHA:
flag=1
elif S[:4]=="rabi":
flag=0
for i in range(5,len(S)):
if S[i] in ALPHA:
flag=1
else:
flag=0
if flag==1:
print("CORRECT (maybe)")
else:
print("WRONG!")
titia