• + 0 comments

    SOLUTION IN RUST:

    fn squares(a: i32, b: i32) -> i32 {
        let c = (a as f64).sqrt().ceil() as i32;
        let f = (b as f64).sqrt().floor() as i32;
    
        (c..=f).count() as i32
    }