Added solution to #29 - distinct powers.
Added solutions to #30 and #31.