Sensei's Library, problem 111

Adapted from Beginner Exercise 111 · OpenContent License

All problems