From 457c2af984ac34e6615a8b49b953c4499809255c Mon Sep 17 00:00:00 2001 From: Aleksa Vuckovic Date: Sat, 16 Dec 2023 06:55:42 +0100 Subject: day16 --- src/day12pt1.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/day12pt1.rs (limited to 'src/day12pt1.rs') diff --git a/src/day12pt1.rs b/src/day12pt1.rs new file mode 100644 index 0000000..bdf4027 --- /dev/null +++ b/src/day12pt1.rs @@ -0,0 +1,13 @@ +pub fn main() { + let txt = std::fs::read_to_string("./input/day12.txt").unwrap(); + let input = txt + .lines() + .map(|s| s.split(" ").collect::>()) + .collect::>>(); + + for line in input { + let s = line[0]; + let n = line[1].split(",").map(|s| s.parse::().unwrap()).collect::>(); + println!("{} {:?}", s, n); + } +} -- cgit v1.2.3