Skip to content

Instantly share code, notes, and snippets.

@aka7h
Created February 12, 2015 18:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aka7h/72f345f2d9af5479c650 to your computer and use it in GitHub Desktop.
Save aka7h/72f345f2d9af5479c650 to your computer and use it in GitHub Desktop.
Easy 3 in codingames.com
import sys, math
# Auto-generated code below aims at helping you parse
# the standard input according to the problem statement.
# game loop
while 1:
l=[]
SX, SY = [int(i) for i in input().split()]
for i in range(8):
MH = int(input()) # represents the height of one mountain, from 9 to 0. Mountain heights are provided from left to right.
l.append(MH)
m = max(l)
C = l.index(m)
if SX == C:
print('FIRE')
else:
print('HOLD')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment