結果

問題 No.2738 CPC To F
ユーザー splash9494
提出日時 2024-05-10 02:51:53
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 283 bytes
コンパイル時間 326 ms
コンパイル使用メモリ 82,108 KB
実行使用メモリ 342,792 KB
最終ジャッジ日時 2024-12-17 23:06:38
合計ジャッジ時間 9,762 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other WA * 20 TLE * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
S = input()

i, current, cnt = 0, 0, 0
while i <= N:
    s = S[current:i]
    if (s == 'CPCTF'):
        cnt += 1
        i += 1
        current += 5
    elif (s == 'CPCTCPC'):
        cnt += 1
        i += 1
        current += 6
    else:
        i += 1

print(cnt)
0