Paint The Tiles

  • + 0 comments

    Hey here is my code in python 3!! All test cases passes with just tiny code below:

    import sys N = int(input().strip()) C = input().strip() count=1 for i in range(len(C)-1):
    if len(set(C))==1: break else: if C[i]!=C[i+1]: count+=1 print(count)