13 lines
323 B
OCaml
13 lines
323 B
OCaml
#load "str.cma" ;;
|
|
#use "lib/file_utils.ml" ;;
|
|
|
|
let contents = read_file "inputs/1.txt" in
|
|
let maxcal = Str.split (Str.regexp "\n\n") contents
|
|
|> List.map (String.split_on_char '\n')
|
|
|> List.map (List.map (int_of_string))
|
|
|> List.map (List.fold_left (+) 0)
|
|
|> List.fold_left (max) 0
|
|
in
|
|
|
|
Printf.printf "%d" maxcal
|