my-problem-solving-solutions-on-codeforces.com icon indicating copy to clipboard operation
my-problem-solving-solutions-on-codeforces.com copied to clipboard

Update 266A - Stones on the Table.cpp

Open Abdelrahmaan24 opened this issue 2 years ago • 0 comments

//Abdelrahman #include <bits/stdc++.h> #include #include #include typedef long long ll; using namespace std; int main() { int n , count = 0; cin >> n; string s; cin >> s; for (int i = 1; i < n; ++i) { if (s[i] == s[i-1]) count++; } cout <<count ; return 0; }

Abdelrahmaan24 avatar Apr 17 '23 22:04 Abdelrahmaan24