Number of Ways to Buy Pens and PencilsThis document provides solutions to this problem implemented in C++, Java, and Python.