結果
問題 |
No.2738 CPC To F
|
ユーザー |
|
提出日時 | 2024-05-09 12:30:52 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 324 bytes |
コンパイル時間 | 390 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,772 KB |
最終ジャッジ日時 | 2024-12-16 01:35:56 |
合計ジャッジ時間 | 2,092 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 5 WA * 17 |
ソースコード
n=int(input()) S = str(input()) cnt=0 for i in range(len(S)-4): if(S[i]=="C" and S[i+1]=="P" and S[i+2]=="C" and S[i+3]=="T"): if(S[i+4]=="F"): cnt+=1 if(len(S)-i>6): if(S[i+4]=="C" and S[i+5]=="P" and S[i+6]=="C"): cnt+=1 i+=6 print(cnt)