Skip to content
Tactiverge

Olympiad · Practice · public practice problem

Where does the staircase robot stop?

Difficulty 2 of 58 points in 4 partsSuggested time ~12 min (never timed here)

The problem

A floor robot starts on square (0, 0) facing north (towards larger y). East is towards larger x. It runs this program:

repeat 3 times:
    forward 2
    turn right
    forward 1
    turn left

Each forward 1 moves exactly one square. Turns happen on the spot.

  1. Part (a) · 2 points

    What is the robot's final x coordinate?

    (pure number)Tolerance: exact

  2. Part (b) · 2 points

    What is the robot's final y coordinate?

    (pure number)Tolerance: exact

  3. Part (c) · 2 points

    How many squares does the robot move in total?

    (pure number)Tolerance: exact

  4. Part (d) · 2 points

    Which way is the robot facing at the end?

Checked so far: 0 of 8 automatically marked points. Nothing is saved.

Stuck? Hints, then the worked solution

Written with AI assistance. Review status: technically-checked (answers recomputed independently with units verified by automated tests); not yet reviewed by an educator or judge.