You are viewing a single comment's thread. Return to all comments →
Did the same
def repeatedString(s, n): c=(s.count('a'))*(n//len(s))+s.count('a',0,n%len(s)) return c
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 →
Did the same
def repeatedString(s, n): c=(s.count('a'))*(n//len(s))+s.count('a',0,n%len(s)) return c