Euler problem #20 c solution