You are viewing a single comment's thread. Return to all comments →
A one line implementation in Python 3:
def repeatedString(s, n): return s.count("a")*(n//len(s)) + s[:n%len(s)].count("a")
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 →
A one line implementation in Python 3: