結果
| 問題 |
No.380 悪の台本
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-06-17 23:01:28 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,012 bytes |
| コンパイル時間 | 441 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 12,544 KB |
| 最終ジャッジ日時 | 2024-11-06 22:39:48 |
| 合計ジャッジ時間 | 1,199 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 4 RE * 4 |
ソースコード
import string
import sys
def ans(b):
if(b):
return "CORRECT (maybe)"
else:
return "WRONG!"
def is_kigou(s):
return all([(not s in k) for k in [string.digits, string.ascii_lowercase, string.ascii_uppercase]])
def gobi(s, k):
for i in range(4):
tail = s[-(i+len(k)):]
nyo = tail[0:3]
kig = tail[3:]
if nyo.lower() == k and all([is_kigou(c) for c in kig]):
return True
return False
def for_petit(s):
return gobi(s, "nyu")
def for_digi(s):
return gobi(s, "nyo")
def for_rabi(s):
return any([not is_kigou(c) for c in s])
def for_gema(s):
return gobi(s, "gema")
def for_piyo(s):
return gobi(s, "pyo")
for line in sys.stdin:
sp = line.split(" ")
who = sp[0]
what = " ".join(sp[1:]).strip()
print(who, what)
d = {
"digi" : for_digi,
"petit": for_petit,
"rabi" : for_rabi,
"gema" : for_gema,
"piyo" : for_piyo,
}
print(ans(d[who](what)))