def calc(input) # input.split(" ").map(&:to_i).then { |a, b, c| # a + b == c ? "Correct" : "Incorrect" # } case input.split(" ").map(&:to_i) in [a, b, c] if a + b == c "Correct" else "Incorrect" end end input = "4 1 5" # input = gets puts calc(input)