pre-calculate factorial and power of 396