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