A*
Size: a a a
A*
P
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)def repeat_str (n, s)
s * n
end
RG
ВШ
class Name
include Module
class Name2 < Hello
CONSTANT1
end
end
module Module
CONSTANT1 = 1
CONSTANT2 = 2
class Hello < Speek
#some code
end
end
DG
DG
ВШ
И
SN

И
А
А
А
A*
D
AS

SN
SR
R
R