Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Rahul255 authored Nov 21, 2018
1 parent 8374432 commit fca10b9
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions 266A.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#include <iostream>
#include <string>
using namespace std;

int main()
{
int n,i,count=0;
string s;
cin>>n;
for(i=0;i<n;i++)
{
cin>>s;
if(s[i]==s[i+1])
{
count++;
}
}
if(count==0)
{
cout<<"0"<<endl;
}
else
{
cout<<count<<endl;
}
return 0;
}

0 comments on commit fca10b9

Please sign in to comment.