Coderbyte Math Challenge Solution