updated project euler problem #5