Solve problem 71 using Rust.