You are viewing a single comment's thread. Return to all comments →
def repeatedString(s: str, n: int) -> int: 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 →