You are viewing a single comment's thread. Return to all comments →
Here is my Python solution!
def repeatedString(s, n): return list(s).count("a") * (n // len(s)) + list(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 →
Here is my Python solution!