結果

問題 No.1367 文字列門松
ユーザー mesame3993
提出日時 2021-10-30 03:15:27
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 282 bytes
コンパイル時間 303 ms
コンパイル使用メモリ 81,776 KB
実行使用メモリ 53,560 KB
最終ジャッジ日時 2024-10-07 13:19:37
合計ジャッジ時間 2,050 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 19 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

s = input()
t = 'kadomatsu'
if len(s) > len(t):
  print('No')
  exit()
indx = -1
for i in range(len(s)):
  if s[i] not in t:
    print('No')
    exit()
  for j in range(indx+1, len(t)):
    if s[i] == t[j]:
      indx = i 
      break
  else:
    print('No')
    exit()
print('Yes')
0