Answer the question
In order to leave comments, you need to log in
How to solve this kind of logic problem?
Since childhood, I hate children's riddles and logic questions, the answers to which can be countless, limited only by my own imagination.
Nevertheless, it is necessary to somehow solve ...
Task:
There are 2 trains in the depot. They can be controlled by commands Right, Left and Speed + all available mats. operators.
These trains were followed by 2 helicopters. They hooked them up and dropped them onto the rails randomly. The distance between trains is unknown.
Task: write code so that the trains meet regardless of how they were dropped by helicopters.
Addition: there are only one rails and they are straight, i.e. trains cannot go in a circle, only back and forth.
Answer the question
In order to leave comments, you need to log in
Let one stand, and the second back and forth with increasing amplitude
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question