prisskreative
5/14/2015 - 8:02 PM

Hackrank

Hackrank

#a Range within b and c

a.range? b, c
read T
loop from 1 to T
    read A and B
    compute the sum
    print value in a newline
end loop

--

def solveMeSecond (a, b)
    return a+b
end
t = gets.to_i
(0...t).each do |i|
    lis = gets.strip.split(" ")
    a = lis[0].to_i
    b = lis[1].to_i
    res = solveMeSecond(a,b)
    puts res
end

output
5
10