problem34: factorial precalculations (quicker)