結果
問題 | No.2738 CPC To F |
ユーザー |
![]() |
提出日時 | 2024-04-20 23:22:04 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 223 ms / 2,000 ms |
コード長 | 289 bytes |
コンパイル時間 | 154 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,772 KB |
最終ジャッジ日時 | 2024-10-12 21:41:59 |
合計ジャッジ時間 | 2,769 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 |
ソースコード
N = int(input()) S = input() T = ["CPCTF", "CPCTCPC"] ret = 0 i = 0 while i < N: found = False for s in T: if i + len(s) <= N and S[i:i+len(s)] == s: ret += 1 i += len(s) found = True break i += not found print(ret)