Add day 2402.

This commit is contained in:
2024-12-02 08:40:32 +00:00
parent 47e1367fa3
commit 85bccdec58
6 changed files with 60 additions and 15 deletions

5
lib/aoc.ml Normal file
View File

@@ -0,0 +1,5 @@
let nums_from_string s = List.map int_of_string (Str.split (Str.regexp " +") s)
let distance1 a b = abs (a - b)
let strings_from_file fname =
In_channel.with_open_text fname In_channel.input_lines