結果
| 問題 |
No.2738 CPC To F
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-04-20 20:42:56 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 322 bytes |
| コンパイル時間 | 597 ms |
| コンパイル使用メモリ | 66,148 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-12 18:49:29 |
| 合計ジャッジ時間 | 1,482 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 5 WA * 17 |
ソースコード
#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; i++) {
if (s.substr(i, 5) == "CPCTF") {
count++;
}else if (s.substr(i,7) == "CPCTCPC"){
count++;
}
}
cout << count << endl;
return 0;
}