2025/2/nu: wip

This commit is contained in:
2026-06-20 20:27:30 +02:00
parent 16684fea02
commit c9a62f274c
2 changed files with 8 additions and 1 deletions
+2
View File
@@ -0,0 +1,2 @@
all:
./main.nu
+6 -1
View File
@@ -12,6 +12,11 @@ def part-1 [parsed] {
} | flatten | math sum
}
def part-2 [parsed] {
$parsed
|
}
let input = open input
let parsed = $input
| str trim
@@ -23,4 +28,4 @@ let parsed = $input
| into int l u
| each {|row| $row.l..$row.u}
timeit {print (part-1 $parsed)}
part-2 ($input | str trim | split row ',' | split column '-' | rename l u | into int l u)