Sensei's Library, problem 219

Adapted from Beginner Exercise 219 · OpenContent License

All problems