Fix Day 19

This commit is contained in:
Christian
2023-12-22 20:47:49 +01:00
parent 7df1136f3b
commit be15ba2bac
2 changed files with 2 additions and 2 deletions

View File

@@ -774,4 +774,4 @@ sg{x>1447:msc,bsb}
{x=619,m=828,a=336,s=762} {x=619,m=828,a=336,s=762}
{x=573,m=101,a=217,s=2115} {x=573,m=101,a=217,s=2115}
{x=50,m=1103,a=230,s=1461} {x=50,m=1103,a=230,s=1461}
{x=780,m=2290,a=339,s=3021} {x=780,m=2290,a=339,s=3021}

View File

@@ -87,7 +87,7 @@ fn main() -> Result<()> {
let mut parts = Vec::new(); let mut parts = Vec::new();
for part_str in parts_str.lines() { for part_str in parts_str.lines() {
let mut part = [0, 0, 0, 0]; let mut part = [0, 0, 0, 0];
for (idx, property) in part_str[1..part.len() - 1].split(',').enumerate() { for (idx, property) in part_str[1..part_str.len() - 1].split(',').enumerate() {
part[idx] = property[2..].parse()?; part[idx] = property[2..].parse()?;
} }