1 answer
(click or scroll down)
#1 looks good
#2 should probably have powers in descending value; it's hard to work right-to-left