2018-day02.exs 516 B

1234567891011121314151617181920212223
  1. ## 2018 ADVENT OF CODE DAY 2
  2. # part one: count the number that have an ID containing exactly two of any
  3. # letter and then separately count those with exactly three of any letter,
  4. # multiply counts together
  5. # part two:
  6. ## part one
  7. defmodule PartOne do
  8. end
  9. # test against examples
  10. test_input = ["abcdef", "bababc", "abbcde", "abcccd", "aabcdd", "abcdee", "ababab"]
  11. test_ans = 12
  12. # using puzzle input
  13. list_input = String.split(String.trim(File.read!("2018-day02-input.txt")))
  14. IO.puts(list_input)
  15. ## part two