quick golf 3.1
This commit is contained in:
parent
4ed1792edd
commit
5d8df9bd80
1 changed files with 3 additions and 0 deletions
3
day03/part1.py
Normal file
3
day03/part1.py
Normal 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))
|
Loading…
Add table
Add a link
Reference in a new issue