結果

問題 No.1367 文字列門松
ユーザー 👑 KazunKazun
提出日時 2021-01-29 21:46:03
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 281 bytes
コンパイル時間 291 ms
コンパイル使用メモリ 87,252 KB
実行使用メモリ 71,744 KB
最終ジャッジ日時 2023-09-09 15:08:07
合計ジャッジ時間 4,050 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 71 ms
71,008 KB
testcase_03 AC 69 ms
71,212 KB
testcase_04 AC 69 ms
71,152 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 69 ms
71,216 KB
testcase_16 AC 69 ms
71,336 KB
testcase_17 AC 68 ms
71,448 KB
testcase_18 AC 69 ms
71,300 KB
testcase_19 AC 70 ms
71,248 KB
testcase_20 AC 70 ms
71,336 KB
testcase_21 AC 70 ms
71,140 KB
testcase_22 AC 70 ms
71,336 KB
testcase_23 AC 70 ms
71,212 KB
testcase_24 AC 70 ms
71,380 KB
testcase_25 AC 70 ms
71,160 KB
testcase_26 AC 71 ms
71,144 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def f(S):
    X="kadomatsu"
    if X==S:
        return True

    if S==X[:-1]:
        return True

    if len(S)>=9:
        return False

    for i in range(len(X)):
        if S==X[:i]+X[i+1:]:
            return True

    return False

S=input()
print("Yes" if f(S) else "No")
0