Advertisement
Guest User

Untitled

a guest
Feb 18th, 2020
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. The MTSBot is a robot currently located at the point (0, 0) in the Cartesian plane. The language it uses has three possible instructions:
  2.  
  3. move x - Move $x$ units in the direction it is facing.
  4. turn - Turn the direction in which it is facing 90 degrees clockwise.
  5. store - Store the coordinates of the current point in its memory.
  6.  
  7. It currently is facing north. Help the MTSBot execute the following series of commands:
  8. move 3
  9. turn
  10. move 5
  11. store
  12. turn
  13. turn
  14. turn
  15. move 12
  16. turn
  17. move 1
  18. store
  19. turn
  20. move 3
  21. store
  22. turn
  23. turn
  24. turn
  25. move 1
  26. turn
  27. move 9
  28. store
  29. turn
  30. turn
  31. move 1
  32. turn
  33. store
  34. turn
  35. turn
  36. move 1
  37. turn
  38. move 5
  39. store
  40. turn
  41. turn
  42. move 6
  43. store
  44. turn
  45. turn
  46. move 2
  47. turn
  48. store
  49.  
  50. HINT: The end result is an eight-letter word.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement