You are on page 1of 2

Here is the method to find the last non zero and the last 2 non zero with example.

R(n!) = Last Digit of [ 2^a x R(a!) x R(b!) ]

where n = 5a + b

Example: What is the rightmost non-zero digit of 25! ?

R (25!) = Last Digit of [ 2^5 x R (5!) x R (0!) ]

R (25!) = Last Digit of [ 2 x 2 x 1 ] = 4

OR

Last two digits of a fact. (!)

Z(ab) = 44 * Z(ab/5) * Z(b!)

Z(ab/5) = highest multiple of 5 in ab

Z(b!) = last two non-zero digit in b! ... Z(90!) = 44 * Z(18!) * z(0!)

Z(18!) = 44 * Z(3!) * Z(8!) =>Z(18!) = 44 * 6 * 32 = 48

Z(90!) = 44 * 48 * 1 = xx12

NOTE : if ten's digit of 'ab' was even then we will take 66 instead of 44 and if we were asked to find only unit digit then 4 and 6

R(n!) i.e. right-most non-zero digit of n! is found out like this:

Step 1: Express n as 5a+bSay, 37 = 37 = 35 + 2 = 5*7 + 2 => (a, b) = (7, 2)

Step 2:R(n!) = R(2^a) * R(a!) * R(b!) So, for 37 => R(2^7) * R(7!) * R(2!)

Note: We can repeat process for R(a!) if a is on the higher sideHere, R(37!) = R(128 ) * R(5040) * R(2)= 8*4*2 = 64 => 4

You might also like