You are viewing a single comment's thread. Return to all comments →
Thank you for the code, and I format it:
def repeatedString(s, n): a_cnt = s.count('a') num = n//len(s) mod = n%len(s) count = a_cnt*num + s[:mod].count('a') return count
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 →
Thank you for the code, and I format it: