You are viewing a single comment's thread. Return to all comments →
Python 3:
def repeatedString(s, n): full_strings = s.count('a') * (n // len(s)) last_string = s[:n % len(s)] if last_string == '': return full_strings return full_strings + last_string.count('a')
Repeated String
You are viewing a single comment's thread. Return to all comments →
Python 3: