Toggle navigation
YouTube
Facebook
Telegram
english
english
українська
Algotester 4.3
Build 496
2024-10-17
Log In
Contact Us
College
Sponsors
Donate
Sources
Python 3
s = input() res = 10**9 for it in range(2): cur = 0 for i, c in enumerate(s): if (c == 'B') ^ it ^ (i % 2): cur += 1 res = min(res, cur) print(res)