Здесь показаны различия между двумя версиями данной страницы.
Предыдущая версия справа и слева Предыдущая версия Следующая версия | Предыдущая версия Следующая версия Следующая версия справа и слева | ||
cg [2020/02/14 15:55] super_admin [POWER OF THOR - EPISODE 1] |
cg [2020/11/03 22:24] super_admin |
||
---|---|---|---|
Строка 1: | Строка 1: | ||
====== Комментарии к проектам на codingame ====== | ====== Комментарии к проектам на codingame ====== | ||
- | Учебный материал для изучающих Pyhton: | + | ===== ONBOARDING (Вводный урок) ===== |
- | + | ||
- | * [[http://ai.lector.ru/?go=python]] | + | |
- | * [[https://nbviewer.jupyter.org/github/probabilitydiht/python/blob/master/python_help.ipynb]] | + | |
- | * [[https://colab.research.google.com/drive/1-0gUd0l4gg2V3QLwXF-ErrGnGWAqZd2H]] | + | |
- | + | ||
- | ===== ONBOARDING (Вводный) ===== | + | |
[[https://www.codingame.com/training/easy/onboarding]] | [[https://www.codingame.com/training/easy/onboarding]] | ||
Строка 194: | Строка 188: | ||
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") | ||
| |