Sie sind auf Seite 1von 2

10/20/2014

Finding the last two non zero digits of a factorial | Aptitude Questions with Answers and Explanations

Home

Arithmetic

Algebra

Reasoning, DI, DS

English

Placement Papers

Technical

GD's

HR interview Questions

GK

General

Finding the last two non zero digits of a factorial


<< Previous
In the previous article we learnt how to find the last non zero digit of a factorial.

In this lesson we try to learn how to find last two non zero digits of a

factorial.
We will take the same example and try to find the last two non zero digit of 100!. In this case we focus on finding the product of last two digits instead of
unit digits the way we did to find the last non zero digit.
We try to repeat some part of the lesson from the earlier lesson.
100! = 1 x 2 x 3 x 4 x 5 x ........x 99 x 100
Let us write the above format like below
(5 x 10 x 15 x......x 95 x 100) x (1 x 2 x 3 x 4 ) x (6 x 7 x 8 x 9) x (11 x 12 x 13 x 14) x (16 x 17 x 18 x 19 ) x ............ x (91 x 92 x 93 x 94) x
(96 x 97 x 98 x 99)
By taking 5's common and multiplying the remaining terms,
=

x 20! x (1 x 2 x 3 x 4) x (6 x 7 x 8 x 9) x (11 x 12 x 13 x 14) x (16 x 17 x 18 x 19 ) x ............ x (91 x 92 x 93 x 94) x (96 x 97 x 98 x 99)

20

Let us consider (10 a + 1)(10 a + 2)(10 a + 3)(10 a +4)


This expression is a generalized format of the terms (1 x 2 x 3 x 4 )
For a = 0 we get the first term in the bracket, for a = 1 we get third term in the bracket
By pulling out one 2 and multiplying the remaining terms gives us,
2 x (10 a + 1)(5a +1) (10 a + 3) (10 a + 4)
2 x (50a 2 + 15a + 1)(100a 2 +70 a + 12)
2 x (5000a 4 + 3500a 3 + 600a 2 + 1500a 3 + 1050a 2 + 180a + 100a 2 + 70a + 12)
2 x (5000a 4 + 5000a 3 + 1750a 2 +250a + 12)
First two terms has more than two zeroes. So last two digits of this expression depends on 1750a 2 +250a + 12
We try to find the last two digits of 1750a 2 +250a.
250 x 7a 2 + a) =
Now If a is odd,

2 5 (7a

7a

+ a

Taking 250 common

+ a)

is even so which contributes another 2. So 1750a 2 +250a has two zeroes. If a is even, 1750a 2 +250a clearly gives two zeroes.

So the last two digits after pulling out 2 from the above is 12.
Similarly, (10 a + 6)(10 a + 7)(10 a + 8)(10 a + 9)
By pulling out one 2 and multiplying the remaining terms gives us,
2 x (5 a + 3)(10a + 7) (10 a + 8) (10 a + 9)
2 x (50a 2 + 65a + 21)(100a 2 +170 a + 72)
2 x (5000a 4 + 8500a 3 + 3600a 2 + 6500a 3 + 11050a 2 + 4680a + 2100a 2 + 3570a + 1512)
2 x (5000a 4 + 15000a 3 + 16750a 2 + 8250a + 1512)
This expression also has last two digits 12 after pulling out 2.
For example:
11 x 12 x 13 x 14 = 24024 = 2 x 12012
16 x 17 x 18 x 19 = 93024 = 2 x 46512
21 x 22 x 23 x 24 = 255024 = 2 x 127512
Therefore, Last two digits of 100! =

20

x 20! x (2 x 12) x (2 x 12) x ......20 times =

So last two digits of 100! = last two digits of

20! 12

20

20! 2

20

12

20

= 10

20

20! 12

20

20

From the above discussion leading two non zero digit of 100 ! =

100
[

]! 12

(100/5)

= 20! 12

20

Applying the above logic, the last two non zero digit of 20! =

20
[

]! 12

(20/5)

= 4! 12

So Last non zero digit of 100! =


=

12

24

(20! 12

20

) = (4! 12

) 12

20

x 4!

24

x324 x24

48

x81 24 x24
4

81 24
http://www.campusgate.co.in/2013/10/finding-last-two-non-zero-digits-of.html
8

1/2

10/20/2014
=

Finding the last two non zero digits of a factorial | Aptitude Questions with Answers and Explanations
4

(2

10

81 24

(if

10

power is odd we get 24 as the last two digits, if even we get 76 ). Read this article

= 76 x 56 x 81 x 24
= 64
2. How do we proceed If the given number is not divisible by 5 exactly?? For example we have to find the leading

non zero digit of 32!

In this case we consider the leading two non zero digit upto 30 and manually we multiply the last two digits of the remaining 2 terms with the result.
30! =

6! 12

10

6! 12

So the unit digit of 32! = 720 x

12

12

= 72 x 28 x 28 = 48 (We omit the zero)

The generalized formula to find the last two non zero digits of N =
Here [ ] denotes greatest integer function.

N
5

]! 12

[N /5]

Last two digits of the remaining terms.

[3.6] = 3

<< Previous
Liked our content? Support us by +1 it
+5 Recommend this on Google

1 Comment

Campusgate

Login

Share Favorite

Sort by Newest

Join the discussion


ANON

a month ago

So Last non zero digit of 100! = (20!1220)=(4!124)1220


= 1224 x 4!
= 424x324x24
= 248x8124x24
in last step shudnt it be 81 raised to power 8 which gives last two digits as 41.

Subscribe

Reply Share

Add Disqus to your site

Privacy

http://www.campusgate.co.in/2013/10/finding-last-two-non-zero-digits-of.html

2/2

Das könnte Ihnen auch gefallen