結果
| 問題 | No.2738 CPC To F |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-04-20 15:18:06 |
| 言語 | TypeScript (6.0.2) |
| 結果 |
AC
|
| 実行時間 | 104 ms / 2,000 ms |
| コード長 | 280 bytes |
| 記録 | |
| コンパイル時間 | 5,995 ms |
| コンパイル使用メモリ | 345,840 KB |
| 実行使用メモリ | 65,072 KB |
| 最終ジャッジ日時 | 2026-06-05 12:16:52 |
| 合計ジャッジ時間 | 8,417 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 22 |
ソースコード
let lines: string[] = require("fs").readFileSync("/dev/stdin", "utf8").split("\n");
let S = lines[1];
S = S.replace(/CPCTCPC/g, 'CPCTF');
let ans = 0;
while (true) {
const index = S.indexOf('CPCTF');
if (index === -1) break;
S = S.slice(index + 5);
ans++;
}
console.log(ans);