You are viewing a single comment's thread. Return to all comments →
def repeatedString(s, n): a=0 for i in s: if i=="a": a+=1 if n%len(s)==0: b=a*(n//len(s)) else: b=a*(n//len(s)) for i in range(n%len(s)): if s[i]=="a": b+=1 return b
Seems like cookies are disabled on this browser, please enable them to open this website
Repeated String
You are viewing a single comment's thread. Return to all comments →