Pattern 1
a = gets.to_i
b = gets.to_i
puts a + b
Pattern 2
a = gets.to_i
b = gets.to_i
num = a + b
puts num
Pattern 3
a = gets
b = gets
puts a + b
Pattern 4
a = gets
b = gets
puts (a + b).to_i
Pattern 5
a = gets.to_s
b = gets.to_s
puts a + b
It's done
s = gets.split(' ').map(&:to_i)
result = s[0] + s[1]
puts result
Recommended Posts