You are viewing a single comment's thread. Return to all comments →
And the same in Ruby:
s.count('a') * n.div(s.size) + s.slice(0,n.remainder(s.size)).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 →
And the same in Ruby: