Solve New Lottery Game (for the small input only)