Sensei's Library, problem 295

Adapted from Beginner Exercise 295 · OpenContent License

All problems