You are viewing a single comment's thread. Return to all comments →
int main(){ int N; scanf("%d",&N); char a[N]; int count=0; scanf("%s",a);
for(int i=0;i<strlen(a);i++) { if(a[i]!=a[i+1]) count++; } printf("%d",count); return 0;
}
Seems like cookies are disabled on this browser, please enable them to open this website
Paint The Tiles
You are viewing a single comment's thread. Return to all comments →
int main(){ int N; scanf("%d",&N); char a[N]; int count=0; scanf("%s",a);
}