You are viewing a single comment's thread. Return to all comments →
Use Python 3:
s, n = input().strip(), int(input().strip()) print(s.count("a") * (n // len(s)) + s[:n % len(s)].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 →
Use Python 3: