(n-2)! = 1 (mod n) if n is prime. (Look up Wilson's Theorem for proofs).

This is because every number between 2 and n-2 has a unique multiplicative inverse different than itself between 2 and n-2 (mod n) if n is prime.

For instance 2*51 = 3*34 = 4*76 = 5*81 = 1 (mod 101) etc.

So, 99! = 2*3*4*...* 98*99=

= (2*51)*(3*34)*(5*81)*...

= 1^49 (mod 101)

= 1 (mod 101)

So 98! is just the multiplicative inverse of 99 (mod 101).

A little trial and error finds that 50*99 = 4950 = 1 (mod 101).

So 98! = 50 (mod 101). 50 is the answer to the problem.

In general, (n-3)! is the multiplicative inverse of (n-2) mod n when n is prime. And this is always (n-1)/2.

Mod n, (n-2)*(n-1)/2 = (-2)*(n-1)/2 = 1-n = 1