problem29-DistinctPowers