結果
| 問題 | No.2738 CPC To F |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-04-20 15:18:06 |
| 言語 | TypeScript(Node) (7.0.2 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 53 ms / 2,000 ms |
| + 584µs | |
| コード長 | 280 bytes |
| 記録 | |
| コンパイル時間 | 947 ms |
| コンパイル使用メモリ | 191,780 KB |
| 実行使用メモリ | 64,572 KB |
| 最終ジャッジ日時 | 2026-10-10 01:41:56 |
| 合計ジャッジ時間 | 3,656 ms |
|
ジャッジサーバーID (参考情報) |
judge5_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);