Sensei's Library, problem 193

Adapted from Beginner Exercise 193 · OpenContent License

All problems