CodeForces-266A

https://vjudge.net/problem/CodeForces-266A

#include<iostream>
using namespace std;

int main()
{
	int n;
	char x[50];
	cin >> n;
	cin >> x;
	int counter = 0;
	for (int i = 0; i < n; i++)
	{
		if (x[i] == x[i + 1])
			counter++;
	}
	cout << counter;
}
阅读更多

没有更多推荐了,返回首页