I'm excited to showcase my coding journey on my blogspot. It's a deep dive into a multitude of programming languages, such as C, Java, Python, and beyond. I tackle challenging interview questions with thorough solutions. Come join me in exploring the world of programming!
n= int(input()) groom= input() brid=input() c_r = brid.count('r') c_m = brid.count('m') lst = [i for i in groom] for i in groom: if i == 'r': if c_r==0: print(len(lst), end='') break c_r-=1 lst.pop(0) elif i == 'm': if c_m==0: print(len(lst),end='') break c_m-=1 lst.pop(0) else: print(0,end='')
Comments
Post a Comment