Solve problem 82 using Rust.