CodeEval 94,117,119,121; PEuler 46,47,49