Find Position
CodeChefOpen on judge ↗
Find out the final position a person who starts from the origin (0,0) and travels in the following scheme: He first turns right and travels 10 units of distance His second turn is upward for 20 units. Third turn is to the left for 30 units. Fourth turn is downward for 40 units. Fifth turn is to the right(again) for 50 units. .. And thus he travels,every time increasing the travel distance
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start