adventofcode2023/day01/sol.awk

3 lines
90 B
Awk
Raw Normal View History

2023-12-02 06:30:10 +00:00
{ gsub("[^0-9]", " "); gsub("[0-9]", "& "); n = $1 $NF; T += n; print n }
END { print T }