quick golf 3.1

This commit is contained in:
Felix Van der Jeugt 2021-12-03 14:38:56 +01:00
parent 4ed1792edd
commit 5d8df9bd80
No known key found for this signature in database
GPG Key ID: 58B209295023754D

3
day03/part1.py Normal file
View File

@ -0,0 +1,3 @@
import sys
c=''.join(["01","10"][sum(c)<len(c)/2]for c in zip(*[[c=="1" for c in l]for l in open(sys.argv[3])]))
print(int(c[1::2],2)*int(c[0::2],2))