You are viewing a single comment's thread. Return to all comments →
Python Solution:
def repeatedString(s, n): # Write your code here count_in_s = s.count('a') full_repeats = n // len(s) remainder = n % len(s) count_in_remainder = s[:remainder].count('a') total = (count_in_s * full_repeats) + count_in_remainder return total
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 Solution: