結果
| 問題 |
No.2738 CPC To F
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-04-20 15:10:59 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 48 ms / 2,000 ms |
| コード長 | 206 bytes |
| コンパイル時間 | 348 ms |
| コンパイル使用メモリ | 82,048 KB |
| 実行使用メモリ | 61,952 KB |
| 最終ジャッジ日時 | 2024-10-12 10:52:01 |
| 合計ジャッジ時間 | 2,169 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 22 |
ソースコード
N=int(input())
S=input()
ans=0
i=0
while i<N:
if i+5<=N and S[i:i+5]=="CPCTF":
ans+=1
i+=5
elif i+7<=N and S[i:i+7]=="CPCTCPC":
ans+=1
i+=7
else:i+=1
print(ans)