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