Created
June 3, 2015 06:52
-
-
Save ZengetsuFR/1b4c90e1d95fa50feff3 to your computer and use it in GitHub Desktop.
Résolution du jeu "Mars Lander" 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
import sys, math | |
# Auto-generated code below aims at helping you parse | |
# the standard input according to the problem statement. | |
N = int(raw_input()) # the number of points used to draw the surface of Mars. | |
for i in xrange(N): | |
# LAND_X: X coordinate of a surface point. (0 to 6999) | |
# LAND_Y: Y coordinate of a surface point. By linking all the points together in a sequential fashion, you form the surface of Mars. | |
LAND_X, LAND_Y = [int(j) for j in raw_input().split()] | |
P = 0 | |
# game loop | |
while 1: | |
# HS: the horizontal speed (in m/s), can be negative. | |
# VS: the vertical speed (in m/s), can be negative. | |
# F: the quantity of remaining fuel in liters. | |
# R: the rotation angle in degrees (-90 to 90). | |
# P: the thrust power (0 to 4). | |
X, Y, HS, VS, F, R, P = [int(i) for i in raw_input().split()] | |
if VS <= -41: | |
P =4 | |
print "0 " + str(P) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment