// well_volume calculates volume of a well from its ground semgments and height
well_volume calculates volume of a well from its ground semgments and height
well_volume calculates volume of a well from its ground semgments and height
fn well_volume(gs: &[u64], heigth: u64) -> f64 {
    let volume = heigth as f64 * gs.len() as f64;
    let land: f64 = gs.iter().map(|g| *g as f64).sum();
    return volume - land;
}
fn well_volume ( gs : & [ u64 ] , heigth : u64 ) -> f64 { let volume = heigth as f64 * gs . len ( ) as f64 ; let land : f64 = gs . iter ( ) . map ( | g | * g as f64 ) . sum ( ) ; return volume - land ; }
well_volume calculates volume of a well from its ground semgments and height
well_volume calculates volume of a well from its ground semgments and height
gs
&[u64]
heigth
u64