Skip to content

Instantly share code, notes, and snippets.

@ZengetsuFR
Last active August 29, 2015 14:22
Show Gist options
  • Save ZengetsuFR/a32ec94b6e3b4daafe5d to your computer and use it in GitHub Desktop.
Save ZengetsuFR/a32ec94b6e3b4daafe5d to your computer and use it in GitHub Desktop.
Résolution du jeu "Thor" sur le site codingame.com
EX,EY,JX,JY=[int(i) for i in raw_input().split()]
#il n'est pas nécessaire de prendre en compte le NORD
#Les tests ne prennent jamais en compte cette direction
while 1:
if EY>JY:
if EX>JX:print 'SE';JX+=1;JY+=1
elif EX<JX:print 'SW';JX-=1;JY+=1
else:print 'S';JY+=1
if EY==JY:
if EX>JX:print 'E';JX+=1
else:print 'W';JX-=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment