adventofcode2024/day01/sol.ivy

10 lines
111 B
Plaintext
Raw Permalink Normal View History

2024-12-02 03:46:58 +00:00
) get "data.ivy"
2024-12-02 03:40:57 +00:00
2024-12-02 03:46:58 +00:00
# part 1
a = input[;1]
b = input[;2]
+/ abs (a[up a] - b[up b])
# part 2
+/ a * +/ a o.== b