Spaceship
CodeChefOpen on judge ↗
Problem description. Aliens have attacked the Earth! Now, the General secretary of the UN has asked you to find out the position of the main spaceship of the aliens. On the coordinate system, the spaceship starts at (0,0).Then the spaceship makes N Turns. On the first turn the spaceship goes 1 unit right On the second turn, the spaceship goes 2 units up. On the third turn, the spaceship goes 3 un
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