hackerrank/interview_preparation_kit_warm_up_challenges.rb
# Complete the repeatedString function below.

Complete the repeatedString function below.
Complete the repeatedString function below .
def repeatedString(s, n)
  counting_s = "a"
  return n if s.size == 1 && s == counting_s
  coefficient = n / s.size
  surplus = n % s.size
  s.count(counting_s) * coefficient + s[0,surplus].count(counting_s)
end
def repeatedString ( s , n ) counting_s = "a" return n if s . size == 1 && s == counting_s coefficient = n / s . size surplus = n % s . size s . count ( counting_s ) * coefficient + s [ 0 , surplus ] . count ( counting_s ) end
Complete the repeatedString function below.
Complete the repeatedString function below .
s
<not_specific>
n
<not_specific>