結果
問題 | No.2738 CPC To F |
ユーザー |
![]() |
提出日時 | 2025-03-26 15:50:33 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 444 bytes |
コンパイル時間 | 166 ms |
コンパイル使用メモリ | 82,688 KB |
実行使用メモリ | 67,256 KB |
最終ジャッジ日時 | 2025-03-26 15:51:39 |
合計ジャッジ時間 | 2,478 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 5 WA * 17 |
ソースコード
n = int(input())s = input().strip()count_cpctf = 0for i in range(n - 4):if s[i] == 'C' and s[i+1] == 'P' and s[i+2] == 'C' and s[i+3] == 'T' and s[i+4] == 'F':count_cpctf += 1count_cpctcpc = 0for i in range(n - 6):if (s[i] == 'C' and s[i+1] == 'P' and s[i+2] == 'C' ands[i+3] == 'T' ands[i+4] == 'C' and s[i+5] == 'P' and s[i+6] == 'C'):count_cpctcpc += 1print(count_cpctf + count_cpctcpc)