Add Problem024.cpp

Also correct the comments in Problem024.py.