結果

問題 No.1367 文字列門松
ユーザー jp_stejp_ste
提出日時 2021-01-31 16:25:54
言語 TypeScript
(5.4.3)
結果
AC  
実行時間 79 ms / 2,000 ms
コード長 250 bytes
コンパイル時間 8,530 ms
コンパイル使用メモリ 255,604 KB
実行使用メモリ 43,976 KB
最終ジャッジ日時 2023-09-11 10:27:08
合計ジャッジ時間 11,401 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
41,916 KB
testcase_01 AC 75 ms
42,016 KB
testcase_02 AC 75 ms
41,912 KB
testcase_03 AC 74 ms
42,016 KB
testcase_04 AC 79 ms
41,912 KB
testcase_05 AC 76 ms
41,992 KB
testcase_06 AC 76 ms
41,856 KB
testcase_07 AC 78 ms
41,988 KB
testcase_08 AC 75 ms
41,912 KB
testcase_09 AC 75 ms
41,968 KB
testcase_10 AC 75 ms
41,916 KB
testcase_11 AC 76 ms
42,000 KB
testcase_12 AC 76 ms
41,856 KB
testcase_13 AC 76 ms
41,992 KB
testcase_14 AC 76 ms
42,032 KB
testcase_15 AC 76 ms
42,028 KB
testcase_16 AC 75 ms
41,916 KB
testcase_17 AC 77 ms
41,912 KB
testcase_18 AC 76 ms
41,812 KB
testcase_19 AC 76 ms
42,032 KB
testcase_20 AC 75 ms
41,992 KB
testcase_21 AC 76 ms
41,960 KB
testcase_22 AC 77 ms
43,976 KB
testcase_23 AC 75 ms
42,108 KB
testcase_24 AC 75 ms
42,096 KB
testcase_25 AC 77 ms
41,812 KB
testcase_26 AC 74 ms
41,988 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

function main(s) {
  const t = "kadomatsu";
  let j = 0;
  for(let i=0; i<t.length; i++) {
    if(s[j] === t[i]) j++;
  }
  console.log( j === s.length ? "Yes" : "No"); 
}

main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split("\n")[0]);
0