結果
問題 | No.2738 CPC To F |
ユーザー |
|
提出日時 | 2024-04-20 20:26:48 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 348 bytes |
コンパイル時間 | 514 ms |
コンパイル使用メモリ | 63,360 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-12 18:31:28 |
合計ジャッジ時間 | 1,373 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | WA * 22 |
ソースコード
#include <iostream>#include <string>using namespace std;int main() {int n; cin >> n;string s; cin >> s;int count = 0;for (int i = 0; i < n - 4; i++) {if (s[i] == 'C' && s[i + 1] == 'P' && s[i + 2] == 'C') {if (s[i + 3] == 'T' || s[i + 4] == 'F') {count++;}}}cout << count << endl;return 0;}