pub fn run(inp :Vec) { let mut max = 0; let mut curr_max = 0; inp.iter().for_each(|elem| { let number = elem.parse::(); match number { Ok(n) => { curr_max += n; } Err(_) => { curr_max = 0; } } if curr_max > max { max = curr_max; } }); println!("a1: {}", max); }