結果

問題 No.1367 文字列門松
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2021-01-29 21:28:52
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 70 ms / 2,000 ms
コード長 450 bytes
コンパイル時間 681 ms
コンパイル使用メモリ 86,832 KB
実行使用メモリ 71,440 KB
最終ジャッジ日時 2023-09-09 14:44:07
合計ジャッジ時間 3,802 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,148 KB
testcase_01 AC 66 ms
71,440 KB
testcase_02 AC 69 ms
71,272 KB
testcase_03 AC 69 ms
71,196 KB
testcase_04 AC 67 ms
71,172 KB
testcase_05 AC 68 ms
70,920 KB
testcase_06 AC 67 ms
71,244 KB
testcase_07 AC 68 ms
71,176 KB
testcase_08 AC 67 ms
71,188 KB
testcase_09 AC 68 ms
71,108 KB
testcase_10 AC 65 ms
71,284 KB
testcase_11 AC 67 ms
71,284 KB
testcase_12 AC 65 ms
71,372 KB
testcase_13 AC 67 ms
71,260 KB
testcase_14 AC 65 ms
71,220 KB
testcase_15 AC 70 ms
71,296 KB
testcase_16 AC 69 ms
71,252 KB
testcase_17 AC 69 ms
71,244 KB
testcase_18 AC 68 ms
71,200 KB
testcase_19 AC 68 ms
71,212 KB
testcase_20 AC 67 ms
71,008 KB
testcase_21 AC 69 ms
71,264 KB
testcase_22 AC 68 ms
71,348 KB
testcase_23 AC 66 ms
71,348 KB
testcase_24 AC 67 ms
71,208 KB
testcase_25 AC 68 ms
71,284 KB
testcase_26 AC 69 ms
71,148 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

"""

"""

from sys import stdin
import sys

def kd(L):
    if L[0]==L[1] or L[1]==L[2] or L[2]==L[0]:
        return False
    elif max(L) == L[1] or min(L) == L[1]:
        return True
    else:
        return False

S = input()
T = "kadomatsu"
ind = 0

for s in S:
    while ind < len(T) and T[ind] != s:
        ind += 1

    if ind < len(T) and s == T[ind]:
        ind += 1
    else:
        print ("No")
        sys.exit()

print ("Yes")
    
0