You are viewing a single comment's thread. Return to all comments →
hey same approach.. just cleaner code
def repeatedString(s, n):
t=0 t=s.count('a') t*=n//len(s) t+=s[0:n%len(s)].count('a') return t
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 →
hey same approach.. just cleaner code