• + 0 comments
    def repeated_string(s, n):
        size = len(s)
        return n // size * list(s).count("a") + list(s)[:n % size].count("a")