結果
| 問題 |
No.2738 CPC To F
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-04-20 15:18:06 |
| 言語 | TypeScript (5.7.2) |
| 結果 |
AC
|
| 実行時間 | 114 ms / 2,000 ms |
| コード長 | 280 bytes |
| コンパイル時間 | 8,147 ms |
| コンパイル使用メモリ | 229,012 KB |
| 実行使用メモリ | 51,824 KB |
| 最終ジャッジ日時 | 2025-01-01 00:44:11 |
| 合計ジャッジ時間 | 10,828 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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);