My solution of p1-p17