[Python/2017] Move solutions into .py files
This commit is contained in:
parent
fbc5fda60f
commit
7b1efc0d9c
51 changed files with 1100 additions and 4546 deletions
19
Python/2017/04.py
Normal file
19
Python/2017/04.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
from lib import *
|
||||
|
||||
input = read_input(2017, 4)
|
||||
|
||||
lines = input.splitlines()
|
||||
|
||||
|
||||
out = 0
|
||||
for pw in lines:
|
||||
x = pw.split()
|
||||
out += len(set(x)) == len(x)
|
||||
print(out)
|
||||
|
||||
|
||||
out = 0
|
||||
for pw in lines:
|
||||
x = ["".join(sorted(e)) for e in pw.split()]
|
||||
out += len(set(x)) == len(x)
|
||||
print(out)
|
Loading…
Add table
Add a link
Reference in a new issue