結果
| 問題 |
No.2738 CPC To F
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-04-21 01:13:30 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 30 ms / 2,000 ms |
| コード長 | 314 bytes |
| コンパイル時間 | 1,404 ms |
| コンパイル使用メモリ | 167,244 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-12 23:33:29 |
| 合計ジャッジ時間 | 2,229 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 22 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
string S;
cin >> N >> S;
int count = 0;
for (int i = 0; i < N; i++){
if (S.substr(i, 5) == "CPCTF"){
count++;
}
if (S.substr(i, 7) == "CPCTCPC"){
count++;
i += 6;
}
}
cout << count << endl;
}