Skip to content

Instantly share code, notes, and snippets.

@ericls
Last active December 2, 2017 06:08
Show Gist options
  • Save ericls/5acf7b3f487e8b3e41363adb6eff7fa9 to your computer and use it in GitHub Desktop.
Save ericls/5acf7b3f487e8b3e41363adb6eff7fa9 to your computer and use it in GitHub Desktop.
2017-day2
sum([max(*row) - min(*row) for row in [[int(i) for i in row.split('\t')] for row in data.split('\n')]])
sum(sum(x/y for y in sorted(row) for x in row if x > y and not x % y) for row in [[int(i) for i in row.split('\t')] for row in data.split('\n')])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment