結果

問題 No.1367 文字列門松
ユーザー tobusakanatobusakana
提出日時 2022-11-26 13:11:35
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 240 bytes
コンパイル時間 264 ms
コンパイル使用メモリ 82,156 KB
実行使用メモリ 53,548 KB
最終ジャッジ日時 2024-04-10 14:28:30
合計ジャッジ時間 1,974 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
53,548 KB
testcase_01 AC 33 ms
52,660 KB
testcase_02 WA -
testcase_03 AC 31 ms
52,884 KB
testcase_04 WA -
testcase_05 AC 32 ms
52,836 KB
testcase_06 AC 32 ms
51,984 KB
testcase_07 AC 32 ms
53,072 KB
testcase_08 AC 31 ms
52,448 KB
testcase_09 AC 32 ms
52,348 KB
testcase_10 AC 31 ms
52,204 KB
testcase_11 AC 32 ms
52,392 KB
testcase_12 AC 31 ms
52,128 KB
testcase_13 AC 34 ms
52,156 KB
testcase_14 AC 32 ms
52,268 KB
testcase_15 AC 32 ms
52,880 KB
testcase_16 AC 32 ms
53,104 KB
testcase_17 WA -
testcase_18 AC 33 ms
53,440 KB
testcase_19 AC 31 ms
52,720 KB
testcase_20 AC 32 ms
53,200 KB
testcase_21 AC 32 ms
52,616 KB
testcase_22 AC 31 ms
51,944 KB
testcase_23 AC 33 ms
52,472 KB
testcase_24 AC 32 ms
52,796 KB
testcase_25 AC 32 ms
52,264 KB
testcase_26 AC 33 ms
52,300 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

S = input()
# Sがkadomatsuの部分列であればOK

T = "kadomatsu"

s_ind = 0
t_ind = 0
while s_ind < len(S):
  while T[t_ind] != S[s_ind]:
    t_ind += 1
    if t_ind == len(T):
      print("No")
      exit(0)
  s_ind += 1
print("Yes")
0