結果
問題 |
No.2738 CPC To F
|
ユーザー |
|
提出日時 | 2024-05-09 12:45:55 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 324 bytes |
コンパイル時間 | 159 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,776 KB |
最終ジャッジ日時 | 2024-12-16 01:51:52 |
合計ジャッジ時間 | 2,475 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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>5): if(S[i+4]=="C" and S[i+5]=="P" and S[i+6]=="C"): cnt+=1 i+=5 print(cnt)