aboutsummaryrefslogtreecommitdiff
path: root/2020/02/puzzle-1.awk
blob: 77971dc85eb183011b95f695fbb2db1961636093 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/env -S awk -f

{
	split($1, bounds, "-")
	freq = gsub(substr($2, 1, 1), "&") - 1
	if (freq >= bounds[1] && freq <= bounds[2])
		count++
}

END { print count }