結果
| 問題 |
No.2738 CPC To F
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-04-21 13:19:52 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 382 bytes |
| コンパイル時間 | 165 ms |
| コンパイル使用メモリ | 82,048 KB |
| 実行使用メモリ | 81,664 KB |
| 最終ジャッジ日時 | 2024-10-13 11:55:55 |
| 合計ジャッジ時間 | 3,732 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | TLE * 1 -- * 21 |
ソースコード
N = int(input())
S = input()
i=3
cnt = 0
while i < N-1:
c = S[i]
if c != "T":
i += 1
continue
if S[i-3:i] == "CPC":
if S[i+1] == "F":
cnt += 1
i += 5
elif i+3 < N and S[i+1:i+4] == "CPC":
cnt += 1
i += 7
else:
continue
else:
i += 4
print(cnt)