Solve problems 24,43 using Rust.