Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- The MTSBot is a robot currently located at the point (0, 0) in the Cartesian plane. The language it uses has three possible instructions:
- move x - Move $x$ units in the direction it is facing.
- turn - Turn the direction in which it is facing 90 degrees clockwise.
- store - Store the coordinates of the current point in its memory.
- It currently is facing north. Help the MTSBot execute the following series of commands:
- move 3
- turn
- move 5
- store
- turn
- turn
- turn
- move 12
- turn
- move 1
- store
- turn
- move 3
- store
- turn
- turn
- turn
- move 1
- turn
- move 9
- store
- turn
- turn
- move 1
- turn
- store
- turn
- turn
- move 1
- turn
- move 5
- store
- turn
- turn
- move 6
- store
- turn
- turn
- move 2
- turn
- store
- HINT: The end result is an eight-letter word.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement