結果
問題 |
No.2738 CPC To F
|
ユーザー |
|
提出日時 | 2024-04-21 01:23:38 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 320 bytes |
コンパイル時間 | 504 ms |
コンパイル使用メモリ | 65,344 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-12 23:44:04 |
合計ジャッジ時間 | 1,469 ms |
ジャッジサーバーID (参考情報) |
judge5 / 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; }