title: Ruby Print two integers in one line without using string interpolations
body: <p>I am solving this problem on hacker rank <a href="https://www.hackerrank.com/challenges/mini-max-sum/problem" rel="nofollow noreferrer">https://www.hackerrank.com/challenges/mini-max-sum/problem</a></p>
  
  <p>Its asking: Print two space-separated long integers denoting the respective minimum and maximum values that can be calculated by summing exactly four of the five integers. (The output can be greater than 32 bit integer.)</p>
  
  <p>If I am doing string interpolations as in my code below, its giving me an error: Your code did not pass this test case. I know I can't use multiple variables in a single puts/p line. </p>
  
  <pre><code>array = gets.split(" ")
  
  def get_max_and_min_sum(input_array)
      return "0 0" if input_array.size &lt; 1
  
      input_array = input_array.map{|i| i.to_i}
  
      input_array = input_array.sort
  
      return "#{sum(input_array[0..3])} #{sum(input_array[1..4])}"
  
  
  
  end
  
  def sum(array)
      return array.inject(0){|sum,i| sum+=i}
  end
  
  p get_max_and_min_sum(array)
  </code></pre>
  
  <p>My question is how can I print multiple integers in one line separated by one space.
  I want to print 10 14 and not "10 14"</p>
  
  <p><a href="https://i.stack.imgur.com/eUjd3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eUjd3.png" alt="enter image description here"></a></p>