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