2018 day 2
This commit is contained in:
parent
9e5da959a3
commit
d511a492e1
250
2018/2/input.txt
Normal file
250
2018/2/input.txt
Normal file
|
@ -0,0 +1,250 @@
|
|||
oeambtcgjqnzhgkdylfapoiusr
|
||||
oewmbtcxjqnzhgvdyltapvqusr
|
||||
oewmbtchjqnzigkdylfapviuse
|
||||
oeimbucxjqnzhgkdyyfapviusr
|
||||
fewmbtcxjqndhgcdylfapviusr
|
||||
oevgbtccjqnzhgkdylfapviusr
|
||||
oewmbtcxjqnzhnkdylmapvpusr
|
||||
oewmbtcxjqnzhxkdyldapvirsr
|
||||
oewmutccjqnzngkdylfapviusr
|
||||
oewmbtcxbqnzhgkdsliapviusr
|
||||
ozwmbtfxjqnzcgkdylfapviusr
|
||||
oewmbtdxjqnzhgkdypfapsiusr
|
||||
oeylbtcxjqnzhgyyylfapviusr
|
||||
oewmbtcxjqnzhgkdrlfakuiusr
|
||||
oewmbtcujqnxhgkdylfadviusr
|
||||
oewmbtcxlqpzhgkdylfaaviusr
|
||||
oewmztcxjqnzhgkdylfqpliusr
|
||||
oeembtcxjqnzhgkdtlmapviusr
|
||||
onwmbtcxjqnqhgkdylfapdiusr
|
||||
oewmbtcxnqnzhgkdylfapsbusr
|
||||
oeoibtjxjqnzhgkdylfapviusr
|
||||
oxwmbtcxjqnzhgkdylfapcipsr
|
||||
oewmbtoxbqnzhgzdylfapviusr
|
||||
okwubtcxjqnzhgkdylfapiiusr
|
||||
oewmbtcxjqnzhgodylfapnicsr
|
||||
oewmitcxjqnzhgkdylfaphlusr
|
||||
oewmbtaxjqnzhgkhylfapveusr
|
||||
oewmftcbjqnzhgkdylfapviurr
|
||||
oewmbtcujqnzbgkdylfapliusr
|
||||
oeevbtcxjqnzhgkdylfapniusr
|
||||
oewmbtcxjqnvhgkdylfapnpusr
|
||||
oewabtcxjqnzhgddylfapviust
|
||||
oewmbtyxjqnzhgkdvlfapvinsr
|
||||
jewmbtcxjonzhzkdylfapviusr
|
||||
oewmbrcxjqnzxgkdylfapoiusr
|
||||
dewmbtmxjqnzhgkdyvfapviusr
|
||||
oewmbtctjqnzhgkdmlfapvihsr
|
||||
oewmbjcxjqnzhgvdylfapviurr
|
||||
oewmbtcxjqnzhgcdxlfapvfusr
|
||||
oewmbucxjqnzhgkdyltapvifsr
|
||||
gewmbtcejqezhgkdylfapviusr
|
||||
oewebtcxjznzhgkdylfapvhusr
|
||||
oewmjtcxjqnzhgkdycfakviusr
|
||||
oewmbtcxjtnvhgkdylfabviusr
|
||||
oewmbtcxjqnthgkgclfapviusr
|
||||
hewmbtcxjqnzhgkdwlfapziusr
|
||||
oewmbtcxjqnzhgkdylfqpviysf
|
||||
oewmbtcxjvnzhgmdylfapviuse
|
||||
oewmbtcxjqnphgkdymzapviusr
|
||||
oewmbtcxjqnzwmkdylfapvbusr
|
||||
oewmbthxjqnzhgkdylfatvilsr
|
||||
oewmbtcxaznzhgkhylfapviusr
|
||||
zewmbscxjqnzhgkdylfatviusr
|
||||
oewmbecyaqnzhgkdylfapviusr
|
||||
oewmbtnxjqnzhekxylfapviusr
|
||||
oewmbtcxjqczhgkdyltnpviusr
|
||||
yewmbecxjnnzhgkdylfapviusr
|
||||
oewmbocxjqnzhgkyylfapviusv
|
||||
oewmxtcxjqnzhgkkylfspviusr
|
||||
oiwmbtcxjqnzhgkdydfapvgusr
|
||||
oewmbtcxjqnzngydylfwpviusr
|
||||
oewmctcxjqnzhgkdelfapviasr
|
||||
oewmbtcxjqnzhgxdwmfapviusr
|
||||
oewmntcxjqnzhgkdylfamviusw
|
||||
oewmatcxjqbzhgkdylfapvhusr
|
||||
oewmbtcxjqnqhmkdyluapviusr
|
||||
opwmbtcxjqnzhgkdywfapvilsr
|
||||
omwmbtcxjqnlhgkdylyapviusr
|
||||
oewmltcxoqnzhgkdylfapvfusr
|
||||
oewmbtcxjqtzhgkdyyoapviusr
|
||||
oewmbtcxjqnzhrkdzlffpviusr
|
||||
oewmbtqxyqnzhgkdylfalviusr
|
||||
oeuzbtcxlqnzhgkdylfapviusr
|
||||
oewmbtcxjqnzhtxdylflpviusr
|
||||
oewmdtfxjqnzhgkdylfapviufr
|
||||
ojwmbtcxjqnzhgkdylfypviqsr
|
||||
oewmbtcxjqnzhgkdylfapvivuf
|
||||
oewmjtcsjqnzxgkdylfapviusr
|
||||
ohembtcxjqnzhnkdylfapviusr
|
||||
oewmptcajqnzhgkdylfapviusd
|
||||
oewmbtcxjcnwhgkbylfapviusr
|
||||
oewmbtcxjqnzhgddnlfapvqusr
|
||||
oewmbtcfjqnzhgkdypfapvzusr
|
||||
oewdbtccjqnzhgfdylfapviusr
|
||||
oewmbtcxjpnzhgkdplfaqviusr
|
||||
oepmbhcxjqnzhgkdylfaaviusr
|
||||
oewmbtcwjqxzhgkwylfapviusr
|
||||
oewmatcxjqnchgkdylfapvifsr
|
||||
omwmbncxjqnzhgkdylfapviuyr
|
||||
sewmbsckjqnzhgkdylfapviusr
|
||||
oewubtcxjqnzhgkdyluapvausr
|
||||
ohwmbtcxqqhzhgkdylfapviusr
|
||||
oewmbtcxjqnzhgkpylfapnissr
|
||||
eewmbccxjqnzhgkdylbapviusr
|
||||
oewmitcyjqnzhgkdylkapviusr
|
||||
oewmbtcxjvnzhgkdyjfvpviusr
|
||||
oewmbtcxjqmzhgkdyefagviusr
|
||||
oewmbtcvjqnzhgkdylpapviufr
|
||||
oewmbtcxjrnkhgkdylfapsiusr
|
||||
oewmbtcxjqnzygkdylfaxvipsr
|
||||
oexmbtcxjqczhgkdyloapviusr
|
||||
oewmbtcxjqnlhtkdylfapvmusr
|
||||
oewmbtcxdqjzdgkdylfapviusr
|
||||
oewmbtclgqnzhgkdylfabviusr
|
||||
oewmbtvfjqnzhgkdylfapviulr
|
||||
oewmbtcxjqnzhgkdyllarvijsr
|
||||
oewmbtyxjqnzhgpdylxapviusr
|
||||
oeylbtcxjqnzhgkyylfapviusr
|
||||
oewmbtctjqnzhjkdylfapviulr
|
||||
oermatcxjqnzhgkdylzapviusr
|
||||
oewmbtcxjqnztgkdzlfapviutr
|
||||
oewlbtcxjqnztgkvylfapviusr
|
||||
oewmbtcxjqzvhgkdylfapviusk
|
||||
oewmbtcxjqnzmgkdyldapvilsr
|
||||
felmbtcxjqnzhgkdylfapviusl
|
||||
oewmbtcxjgnzhgkjylfaeviusr
|
||||
ovwmbtcxjqpzhgkdylfapvizsr
|
||||
eewmbtcpjqnzhgkdylfapvijsr
|
||||
oewmbzcxjqnzhgkdylfaeviutr
|
||||
tewmbtcljqhzhgkdylfapviusr
|
||||
oewmbtcujqnzhgkdnliapviusr
|
||||
oewmbtcljqnzhskdylfapvgusr
|
||||
oewmbtchjqnzhgkdylmapviuse
|
||||
oewmbtcxjqnzbgkdylfaiviurr
|
||||
oewmbtcxjqnzhkkdyloapsiusr
|
||||
oewjbtcxjqnhhgkdylfapjiusr
|
||||
odwmbtcnjqnzhgkdylfapvicsr
|
||||
oewmbccxjqrzwgkdylfapviusr
|
||||
kewmbtcvjqnzhgkdylaapviusr
|
||||
okwmbtcxjqnzhgkdylfspvausr
|
||||
oewmbtcxjynzhgkdyafapviusw
|
||||
oewmbtcxjqnzhgwdyleayviusr
|
||||
oewmbtcxjqnzhgkdylfapviicl
|
||||
oewmbtcxjqnzhgkdyltaeziusr
|
||||
oewmbtcxrqnzhgkdylftpvizsr
|
||||
oewsrtcgjqnzhgkdylfapviusr
|
||||
oewmbtsxgqnzhgxdylfapviusr
|
||||
oewmbtcxjanzhgtdylfapeiusr
|
||||
oewybtcgjqnzhgkdylfapviust
|
||||
ojwmbncxjqnzhgkdylfapgiusr
|
||||
ocgebtcxjqnzhgkdylfapviusr
|
||||
oejcbtcxjqnzhgkvylfapviusr
|
||||
oswmbtcxjqnkhgkdylfapviusb
|
||||
oewdbtcxjqnzdgkdylfypviusr
|
||||
oawmutcxjqnzhgkddlfapviusr
|
||||
oewzbtcxyqnzhgkdylfapviusy
|
||||
zewmbtcxjqnzkgkdylwapviusr
|
||||
aewmbtkxjqnzhgkdylfapviuer
|
||||
oewmbtcxwqnzhgkdyofapviuur
|
||||
oewmbtcxjqnzggkdylfapanusr
|
||||
oewmstcxuqnzhgkdylzapviusr
|
||||
zewmbtcxjqozhgkdelfapviusr
|
||||
oewzbtcxjqnahgkdyllapviusr
|
||||
fewmatcxjqnghgkdylfapviusr
|
||||
oewmbtcxjqnzhgkdylfapviyqb
|
||||
oewwbtcxjqnzhgkdyljapviqsr
|
||||
oewmbtbxjqnzhgkxylfapviesr
|
||||
oewmbtcbjqnphgkdylfapviysr
|
||||
oewabtcxyqnzhgkdylfabviusr
|
||||
oewmbtcxhknzhgkdylfapviusd
|
||||
ozwmbtcljqnzhgkdylfapviksr
|
||||
tewmbtcxjqnzhgkdylfaxvqusr
|
||||
oewmbtcxrqnzhgkdytfapvrusr
|
||||
ohwmbtcxjcnzhgkdyifapviusr
|
||||
oewmbpcxjqnzhwkdylfaphiusr
|
||||
oedmbtcxjqnzhgnbylfapviusr
|
||||
oewmbocxjqnehgkdylfapvbusr
|
||||
oeymbtcxjqezegkdylfapviusr
|
||||
oewmbtcxjqnzhgkdllferviusr
|
||||
oewmbtcxjqnzhgkwmlfawviusr
|
||||
oewmbtcxienzhgkdyzfapviusr
|
||||
mewmbtcxjqnzhqkdylfapviwsr
|
||||
oewmbtcxjqnztgkmylfapvdusr
|
||||
ouwmbtcxjqnzhokdylpapviusr
|
||||
oewmctcxjqhzhgmdylfapviusr
|
||||
oewmbtcyjqnzhmkdylfarviusr
|
||||
oewmbtcxjqnzhgkdpnfzpviusr
|
||||
oewmptcxjqnzhgkdylkapviulr
|
||||
nefmbtcxsqnzhgkdylfapviusr
|
||||
oewmbtcxwqnzhgkdilfapvizsr
|
||||
eewmbtcxjqwzhghdylfapviusr
|
||||
oewmbtixmqnzhgkjylfapviusr
|
||||
okwmbtcdzqnzhgkdylfapviusr
|
||||
oewmbtxxjrnzigkdylfapviusr
|
||||
oewmdycxjqnzhekdylfapviusr
|
||||
oewmutcxjqnzhgkdylfapsiuqr
|
||||
oewmbacxjqnzrgkdrlfapviusr
|
||||
oewmbtcxpqnzhmkdylfapciusr
|
||||
oewabtcxjqnzhgkdyrcapviusr
|
||||
oswmbtcxjqnzhgkdrxfapviusr
|
||||
gewmbtcnjqnzhgkdylvapviusr
|
||||
newmbtcxjwnzfgkdylfapviusr
|
||||
lewmbtcxjqnzhgkdylfaptiujr
|
||||
oewwbtcxjqndhgkdylfapiiusr
|
||||
oewmbtcxjqnzhggdylfapvqmsr
|
||||
lewmbtcxjqnzhgkhllfapviusr
|
||||
oewmbtocjqnzhgkdylfapvhusr
|
||||
oedmbtcxjqnzhgkdyhfapviusb
|
||||
oewmbtcxjqnzhgkdylfajvaosr
|
||||
zewmbtcxjqnzhgkdylfapvsssr
|
||||
oewmbthxjqnzhskdylfapviuqr
|
||||
yewmrtcvjqnzhgkdylfapviusr
|
||||
oewmbtctjqnzhgkdylfabvhusr
|
||||
oesmstcxjqnzhgkdylfapqiusr
|
||||
oewmbtcxjqnzzgkdylfopiiusr
|
||||
otwmbtzxjqnzhgkdylfaxviusr
|
||||
ouwmbxcxjqnzhgkdylfapvnusr
|
||||
oewmbtcxjqezhgedylfapvsusr
|
||||
oesmhtcsjqnzhgkdylfapviusr
|
||||
oewdbtcxjqnzhgkdilfapvifsr
|
||||
oewmbtcxjqnzhgudynfamviusr
|
||||
qewhbtcxjqnzhgkdyxfapviusr
|
||||
oewmbzcxjqtzhgkdylfapvitsr
|
||||
oewmbtccjqzzhgkaylfapviusr
|
||||
jewmbtcxmqnzhlkdylfapviusr
|
||||
oewmbtcxjqbzhgkdnlfapviusp
|
||||
oeimbtcdjqnzhgkdylfapviuer
|
||||
oewtbtcxjqnihgkdylfahviusr
|
||||
oewmbtcxhqnzhgkdylfapdiudr
|
||||
oefmbtcxjqyshgkdylfapviusr
|
||||
oewmbtcxjqnzhgkfglfapviusx
|
||||
oecmbocxjqnzhgkdmlfapviusr
|
||||
oewmbtcxjqnzhghdylfavviuhr
|
||||
oewmbmcxiqnzhgkpylfapviusr
|
||||
oewmbtcnjqnzhgkrylfanviusr
|
||||
oewmbocxjqnzhzkdllfapviusr
|
||||
eewmbtckjqnzhgkdylfapviusg
|
||||
oewmbtcrjqqzhgkdylfapvigsr
|
||||
oewmbtcxjqazhgfdylfapjiusr
|
||||
oetmbtcxjqnzhgldylfapviqsr
|
||||
oewbbtcxjqnzlgkdylfapviuse
|
||||
oewmbtcxjqnzhglbolfapviusr
|
||||
oewmbtcxjqnzcgkdylfapviuhy
|
||||
oelmbtcxjqfzhgkdylaapviusr
|
||||
oojmbycxjqnzhgkdylfapviusr
|
||||
oewmbtrxjqnrhgkdylfapniusr
|
||||
oewmbtcxjqnzhgkyyhfapviuso
|
||||
oewabtcxjqnzhskdylfapviusx
|
||||
oewmbtcrjqnmhgkdylfapvnusr
|
||||
oewmbtcxjqrzhgkdylfapvpuss
|
||||
oewmbtcxhqnzwgkddlfapviusr
|
||||
kewmbtcxjqnzhgkyylfajviusr
|
||||
oswmbtcxjqnzhgkdjlfapviuss
|
||||
onwmbtcxjqnchgkdylfapvpusr
|
||||
oeymbtcxjqnxhikdylfapviusr
|
||||
oewmblcdjqnzhgkdylfapviysr
|
||||
oewmbtcxeqczhgudylfapviusr
|
||||
oewmbpgxjqnzhgkdylfapfiusr
|
||||
ohwmwtcxjqnzhgkdylftpviusr
|
||||
zebmbtuxjqnzhgkdylfapviusr
|
14
2018/2/part1.py
Normal file
14
2018/2/part1.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
with open('input.txt') as input:
|
||||
lines = [line.strip('\n') for line in input.readlines()]
|
||||
two = 0
|
||||
three = 0
|
||||
for line in lines:
|
||||
for char in 'qwertyuiopasdfghjklzxcvbnm':
|
||||
if line.count(char) == 2:
|
||||
two += 1
|
||||
break
|
||||
for char in 'qwertyuiopasdfghjklzxcvbnm':
|
||||
if line.count(char) == 3:
|
||||
three += 1
|
||||
break
|
||||
print(two, three, two * three)
|
20
2018/2/part2.py
Normal file
20
2018/2/part2.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
with open('input.txt') as input:
|
||||
lines = [line.strip('\n') for line in input.readlines()]
|
||||
|
||||
for line1 in lines:
|
||||
for line2 in lines:
|
||||
i = 0
|
||||
amt = 0
|
||||
for i in range(len(line1)):
|
||||
if line1[i] != line2[i]:
|
||||
diff = i
|
||||
amt += 1
|
||||
if amt > 1:
|
||||
break
|
||||
i += 1
|
||||
if amt == 1:
|
||||
print(line1 + '\n' + line2)
|
||||
print('you can figure out where the different char is')
|
||||
break
|
||||
if amt == 1:
|
||||
break
|
Loading…
Reference in a new issue