Здесь показаны различия между двумя версиями данной страницы.
Предыдущая версия справа и слева Предыдущая версия | Следующая версия Следующая версия справа и слева | ||
cg [2020/02/14 15:55] super_admin [POWER OF THOR - EPISODE 1] |
cg [2020/02/14 16:14] super_admin [POWER OF THOR - EPISODE 1] |
||
---|---|---|---|
Строка 194: | Строка 194: | ||
import math | import math | ||
- | # Auto-generated code below aims at helping you parse | ||
- | # the standard input according to the problem statement. | ||
# --- | # --- | ||
# Hint: You can use the debug stream to print initialTX and initialTY, if Thor seems not follow your orders. | # Hint: You can use the debug stream to print initialTX and initialTY, if Thor seems not follow your orders. | ||
- | # light_x: the X position of the light of power | + | # light_x: X позиция энергетического источника |
- | # light_y: the Y position of the light of power | + | # light_y: Y позиция энергетического источника |
- | # initial_tx: Thor's starting X position | + | # initial_tx: Thor's starting X position (точка начала движения Тора на оси x) |
- | # initial_ty: Thor's starting Y position | + | # initial_ty: Thor's starting Y position (точка начала движения Тора на оси y) |
light_x, light_y, initial_tx, initial_ty = [int(i) for i in input().split()] | light_x, light_y, initial_tx, initial_ty = [int(i) for i in input().split()] | ||
- | # game loop | + | # игровой цикл (заканчивается автоматически, когда Тор достигнет цели, или когда у него закончится энергия) |
while True: | while True: | ||
- | remaining_turns = int(input()) # The remaining amount of turns Thor can move. Do not remove this line. | + | remaining_turns = int(input()) # Уровень энергии, которая остается еще у Тора. |
- | # Write an action using print | ||
# To debug: print("Debug messages...", file=sys.stderr) | # To debug: print("Debug messages...", file=sys.stderr) | ||
- | # A single line providing the move to be made: N NE E SE S SW W or NW | + | # Для перемещения тора, следует вывести одно из направлений: N NE E SE S SW W or NW |
print("SE") | print("SE") | ||
| |