Euler project in groovy