Paint The Tiles

  • + 0 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;
    

    }