Add 2020 Day 6, would not have been possible without the help of gvieira

#4130 on discord
This commit is contained in:
David Daily 2020-12-11 09:40:57 -06:00
parent bd144cb3f8
commit 4091b2c9f0
1 changed files with 6 additions and 0 deletions

6
2020/day6.ahk Normal file
View File

@ -0,0 +1,6 @@
for _, group in StrSplit(FileOpen("data6.txt","R").Read(),"`r`n`r`n")
Loop 26 {
p1 += !!RegExMatch(group,chr(96 + A_Index))
p2 += !!RegExMatch(group,"s)(" chr(96 + A_Index) ".*){" StrSplit(group,"`n").Length() "}")
}
Msgbox % "Part 1: " p1 "`nPart 2: " p2