diff --git a/2020/day6.ahk b/2020/day6.ahk new file mode 100644 index 0000000..2f51c05 --- /dev/null +++ b/2020/day6.ahk @@ -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 \ No newline at end of file