Solve problem 62 using Rust.