Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.64 KB | None | 0 0
  1. import sys
  2. import math
  3.  
  4. # Auto-generated code below aims at helping you parse
  5. # the standard input according to the problem statement.
  6.  
  7.  
  8. # game loop
  9. while True:
  10.     space_x, space_y = [int(i) for i in input().split()]
  11.     for i in range(8):
  12.         mountain_h = int(input())  # represents the height of one mountain, from 9 to 0. Mountain heights are provided from left to right.
  13.  
  14.     # Write an action using print
  15.     # To debug: print("Debug messages...", file=sys.stderr)
  16.  
  17.     # either:  FIRE (ship is firing its phase cannons) or HOLD (ship is not firing).
  18.     if (mountain_h == 9):
  19.         print("FIRE")
  20.     else:
  21.         print("HOLD")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement