python answer to first euler problem