• + 0 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")