結果

問題 No.2738 CPC To F
ユーザー sk4rdsk4rd
提出日時 2024-04-20 17:47:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 171 ms / 2,000 ms
コード長 217 bytes
コンパイル時間 393 ms
コンパイル使用メモリ 82,576 KB
実行使用メモリ 95,972 KB
最終ジャッジ日時 2024-04-20 17:47:39
合計ジャッジ時間 2,464 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,172 KB
testcase_01 AC 38 ms
52,584 KB
testcase_02 AC 171 ms
95,872 KB
testcase_03 AC 157 ms
95,972 KB
testcase_04 AC 37 ms
52,956 KB
testcase_05 AC 41 ms
53,324 KB
testcase_06 AC 38 ms
53,196 KB
testcase_07 AC 39 ms
53,012 KB
testcase_08 AC 44 ms
60,888 KB
testcase_09 AC 54 ms
69,848 KB
testcase_10 AC 43 ms
59,372 KB
testcase_11 AC 51 ms
67,560 KB
testcase_12 AC 54 ms
68,576 KB
testcase_13 AC 56 ms
70,892 KB
testcase_14 AC 57 ms
72,296 KB
testcase_15 AC 60 ms
71,384 KB
testcase_16 AC 56 ms
71,156 KB
testcase_17 AC 55 ms
70,452 KB
testcase_18 AC 57 ms
72,580 KB
testcase_19 AC 56 ms
71,160 KB
testcase_20 AC 57 ms
71,832 KB
testcase_21 AC 56 ms
71,412 KB
testcase_22 AC 59 ms
71,916 KB
testcase_23 AC 57 ms
71,324 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
s = list(input() + '.......')
ans = 0
for i in range(n):
    if ''.join(s[i:i+5]) == 'CPCTF':
        ans += 1
    elif ''.join(s[i:i+7]) == 'CPCTCPC':
        ans += 1
        s[i+6] = '.'
print(ans)
0