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.

10.py 332B

123456789
  1. from shared import knot_hash, knot_hash_rounds
  2. with open('data/10.txt', 'r') as file:
  3. lengths = list(map(int, file.readline().strip().split(',')))
  4. data = knot_hash_rounds(lengths)
  5. print(f'Part one: {data[0]*data[1]}')
  6. with open('data/10.txt', 'r') as file:
  7. print(f'Part two: {knot_hash(file.readline().strip())}')