Advertisement
Guest User

Untitled

a guest
Nov 27th, 2015
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. loop do
  2. space_x, space_y = gets.split(" ").collect {|x| x.to_i}
  3. 8.times do
  4. mountain_h = gets.to_i # represents the height of one mountain, from 9 to 0. Mountain heights are provided from left to right.
  5. end
  6.  
  7. # Write an action using puts
  8. # To debug: STDERR.puts "Debug messages..."
  9.  
  10. if mountain_h == 9
  11. puts "FIRE"
  12. else
  13. puts "HOLD"
  14. end
  15.  
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement