Problem in project euler