Solve problem 41 using Rust.