Problem 039 added

WARNING! Inefficient algorithm may kill your PC