problem 42

cpp and python
problem43