結果

問題 No.2738 CPC To F
ユーザー cologne
提出日時 2025-05-23 16:11:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 56 ms / 2,000 ms
コード長 209 bytes
コンパイル時間 473 ms
コンパイル使用メモリ 82,308 KB
実行使用メモリ 61,724 KB
最終ジャッジ日時 2025-05-23 16:12:02
合計ジャッジ時間 3,086 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
s = input()

i = 0
c = 0
while i < n:
    if s[i:i+5] == 'CPCTF':
        i += 5
        c += 1
    elif s[i:i+7] == 'CPCTCPC':
        i += 7
        c += 1
    else:
        i += 1
print(c)
0