AS
Size: a a a
AS
h
s
SR
A*
h
RN
h
L
AO
VV
VV
VV
RG
https://www.codewars.com/kata/string-repeat/train/ruby
Write a function called repeatString which repeats the given String src exactly count times.
repeatStr(6, "I") // "IIIIII"
repeatStr(5, "Hello") // "HelloHelloHelloHelloHello"
Test.describe("Example test cases") do
Test.assert_equals(repeat_str(3, "*"),"***")
Test.assert_equals(repeat_str(5, "#"),"#####")
Test.assert_equals(repeat_str(2, "ha "),"ha ha ")
enddef repeat_str (n, s)
end
def repeat_str (n, s)
count = 0
src = ''
while count <= n do
src += s
end
puts src
end
Execution Timed Out (12000 ms)VN
GM
https://www.codewars.com/kata/string-repeat/train/ruby
Write a function called repeatString which repeats the given String src exactly count times.
repeatStr(6, "I") // "IIIIII"
repeatStr(5, "Hello") // "HelloHelloHelloHelloHello"
Test.describe("Example test cases") do
Test.assert_equals(repeat_str(3, "*"),"***")
Test.assert_equals(repeat_str(5, "#"),"#####")
Test.assert_equals(repeat_str(2, "ha "),"ha ha ")
enddef repeat_str (n, s)
end
def repeat_str (n, s)
count = 0
src = ''
while count <= n do
src += s
end
puts src
end
Execution Timed Out (12000 ms)SR
https://www.codewars.com/kata/string-repeat/train/ruby
Write a function called repeatString which repeats the given String src exactly count times.
repeatStr(6, "I") // "IIIIII"
repeatStr(5, "Hello") // "HelloHelloHelloHelloHello"
Test.describe("Example test cases") do
Test.assert_equals(repeat_str(3, "*"),"***")
Test.assert_equals(repeat_str(5, "#"),"#####")
Test.assert_equals(repeat_str(2, "ha "),"ha ha ")
enddef repeat_str (n, s)
end
def repeat_str (n, s)
count = 0
src = ''
while count <= n do
src += s
end
puts src
end
Execution Timed Out (12000 ms)A*
https://www.codewars.com/kata/string-repeat/train/ruby
Write a function called repeatString which repeats the given String src exactly count times.
repeatStr(6, "I") // "IIIIII"
repeatStr(5, "Hello") // "HelloHelloHelloHelloHello"
Test.describe("Example test cases") do
Test.assert_equals(repeat_str(3, "*"),"***")
Test.assert_equals(repeat_str(5, "#"),"#####")
Test.assert_equals(repeat_str(2, "ha "),"ha ha ")
enddef repeat_str (n, s)
end
def repeat_str (n, s)
count = 0
src = ''
while count <= n do
src += s
end
puts src
end
Execution Timed Out (12000 ms)
SR
T