Toggle navigation
YouTube
Facebook
Telegram
english
english
українська
Algotester 4.3
Build 496
2024-10-17
Log In
Contact Us
College
Sponsors
Donate
Sources
C++ 14
#include <bits/stdc++.h> using namespace std; int main() { string s; cin>>s; int k = s.size(); for(int i = 0; i < (int)s.size() - 1; i++) if(s[i] == s[i + 1]) k--; cout << k << "\n"; }