diff --git a/src/bin/coded_triangle_numbers.rs b/src/bin/coded_triangle_numbers.rs index 2b9c1cf..b6e81db 100644 --- a/src/bin/coded_triangle_numbers.rs +++ b/src/bin/coded_triangle_numbers.rs @@ -8,8 +8,11 @@ fn main() { characters.push(c); } - let contents = fs::read_to_string("assets/input") + let mut contents = fs::read_to_string("assets/input") .expect("Could not read the input file").replace("\"\n", ""); + if contents.len() > 0 { + contents.remove(0); + } let words = contents.split("\",\"").collect::>(); let mut triangles = 0;