Add 2020 Day 6, would not have been possible without the help of gvieira
#4130 on discord
This commit is contained in:
parent
bd144cb3f8
commit
4091b2c9f0
6
2020/day6.ahk
Normal file
6
2020/day6.ahk
Normal 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
|
Loading…
x
Reference in New Issue
Block a user