結果
問題 |
No.2738 CPC To F
|
ユーザー |
|
提出日時 | 2024-04-20 17:34:07 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 331 bytes |
コンパイル時間 | 99 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 17,868 KB |
最終ジャッジ日時 | 2024-10-12 13:31:16 |
合計ジャッジ時間 | 6,076 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | TLE * 2 -- * 20 |
ソースコード
N=int(input()) S=input() T="" i=0 tmp="" while i<N: tmp+=S[i] if len(T)>=4 and T[-4:]=="CPCT": for _ in range(2): i+=1 if i==N:break tmp+=S[i] if tmp=="CPC":T+="F" else:T+=tmp tmp="" else: T+=tmp tmp="" i+=1 print(T.count("CPCTF"))