You are viewing a single comment's thread. Return to all comments →
n=int(input()) s=input() if len(set(s))==1: print(1) else: c=0 for i in range(len(s)-1): if s[i]!=s[i+1]: c+=1 else: continue print(c+1)
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 →