-
-
Save ZengetsuFR/a32ec94b6e3b4daafe5d to your computer and use it in GitHub Desktop.
Résolution du jeu "Thor" sur le site codingame.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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