Advent of Code 2016 solutions https://adventofcode.com/2016/
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

123456
  1. #!/usr/bin/python3
  2. with open('data/06.txt', 'r') as file:
  3. cols = list(zip(*map(str.strip, file.readlines())))
  4. print(''.join(max(set(col), key=col.count) for col in cols))
  5. print(''.join(min(set(col), key=col.count) for col in cols))