Solutions to Advent of Code 2017 https://adventofcode.com/2017/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25.txt 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. Begin in state A.
  2. Perform a diagnostic checksum after 12586542 steps.
  3. In state A:
  4. If the current value is 0:
  5. - Write the value 1.
  6. - Move one slot to the right.
  7. - Continue with state B.
  8. If the current value is 1:
  9. - Write the value 0.
  10. - Move one slot to the left.
  11. - Continue with state B.
  12. In state B:
  13. If the current value is 0:
  14. - Write the value 0.
  15. - Move one slot to the right.
  16. - Continue with state C.
  17. If the current value is 1:
  18. - Write the value 1.
  19. - Move one slot to the left.
  20. - Continue with state B.
  21. In state C:
  22. If the current value is 0:
  23. - Write the value 1.
  24. - Move one slot to the right.
  25. - Continue with state D.
  26. If the current value is 1:
  27. - Write the value 0.
  28. - Move one slot to the left.
  29. - Continue with state A.
  30. In state D:
  31. If the current value is 0:
  32. - Write the value 1.
  33. - Move one slot to the left.
  34. - Continue with state E.
  35. If the current value is 1:
  36. - Write the value 1.
  37. - Move one slot to the left.
  38. - Continue with state F.
  39. In state E:
  40. If the current value is 0:
  41. - Write the value 1.
  42. - Move one slot to the left.
  43. - Continue with state A.
  44. If the current value is 1:
  45. - Write the value 0.
  46. - Move one slot to the left.
  47. - Continue with state D.
  48. In state F:
  49. If the current value is 0:
  50. - Write the value 1.
  51. - Move one slot to the right.
  52. - Continue with state A.
  53. If the current value is 1:
  54. - Write the value 1.
  55. - Move one slot to the left.
  56. - Continue with state E.