TCS
Company
Logical Reasoning
Letter Series
What is the last non zero digit of 96!
Read Solution (Total 10)
-
- If we try to compute 96!
then
4*z(96/5)*z(6)
=4*z(19)*8
=8*(4*z(19/5)*z(9))
=8*(4*z(3)*8)
=8*(4*6*8)
=1536 i.e last digit is 6 - 12 years agoHelpfull: Yes(4) No(9)
- Lets say D(N) denotes the last non zero digit of factorial, then the algo says
D(N)=4*D[N/5]*D(Unit digit of N)[If tens digit of N is odd]
D(N)=6*D[N/5]*D(Unit digit of N)[If tens digit of N is even]; Where [N/5] is greatest Integer Function
#Problem 18
Find the last non zero digit of 26!*33!.
Solution Scheme and Approach
D(26)=6*D[26/5]*D(6)=6*D(5)*D(6)=6*2*2=4[D(5) means last non zero digit of 5!=120 which is 2, same for D(6)]
D(33)=4*D[33/5]*D(3)=4*D(6)*D(3)=4*2*6=8
Hence last non aero digit of 26!*33!=4*8=2
Remember
D(1)=1 D(2)=2 D(3)=6 D(4)=4 D(5)=2 D(6)=2 D(7)=4 D(8)=2 D(9)=8 - 12 years agoHelpfull: Yes(3) No(0)
- Z(n) denotes the last non zero digit in n!
Z(n) = {4 if tens digit is odd and 6 if tens digit is even) *
Z(n/5) * z(Units digit) therefore Z(96) = 4 * Z(96/5) * Z(6)
= 4 * z(19) * last non zero digit of 6!
= 4 * last non zero digit of 19! * last non zero digit of 6! again, 4 * z(19/5) * last non zero digit of 9! =192
= 4 * last non zero digit of (192) * last non zero digit of (120)
= 4 * 2 * 2
= 16 (answer is the last digit ie 2)
= 6 - 11 years agoHelpfull: Yes(3) No(0)
- can u explain me how it can be solved
- 12 years agoHelpfull: Yes(0) No(0)
- satyanaryana:any alternative way??
- 12 years agoHelpfull: Yes(0) No(0)
- 6! is 6*5*4*3*2*1=720
so last non zero is 2
is my correct???????????? - 12 years agoHelpfull: Yes(0) No(2)
- hey can any one explain simple logic behind it...satyanarayana ur logic not clear
- 12 years agoHelpfull: Yes(0) No(0)
- ANS : 8
up to 9! we can write..1*2*3*4*..9 = ....8
same way 11-19 we can write ...1*2*3*4*..9 (only unit dig) = 8
this is similar 4 (21-29),(31-39)...(81-89).... so total is 8^9 = 8
now consider only 10*20*30...90 = 8 (take only 10's dig.)
so 8*8 = 64 .... no for 91-96... = 1*2*3*4*5*6 = ..2
so the unit digit is 64*2 = 128 ... i.e. 8...
- 12 years agoHelpfull: Yes(0) No(2)
- let n=96
A=96/5 =19
B=96%5 =1
(2^A)*A!*B!
(2^19)*19!*1!
last digits
8*8*6*4
ans=6 - 7 years agoHelpfull: Yes(0) No(0)
- n = 96. Expressing 96 in terms of 5a+b, we have
96 = 5*19+1. i.e a=19 and b=1.
L(96!) = Last Digit of [ 219 x L(19!) x L(1!) ]
Calculating the last digit of 219. Using the technique explained in this post : Units digit of 219 => Units digit of 23 = 8
Next lets calculate L(19!).
Again expressing 19 in terms of 5a + b, we have
19 = 5×3 + 4.
Thus L(19!) = Last Digit of [ 23 x L(3!) x L(4!) ]
Last digit of 23 = 8.
Right most non zero digit of L(3!) = 3×2 = 6
Last non zero digit of L(4!) = 4x3x2 = 4.
Hence L(19!) = Last digit of [8 x 6 x 4] = 2
Now, getting back to our original problem
L(96!) = Last Digit of [ 219 x L(19!) x L(1!) ]
Last digit of 219 = 8
L(19!) = 2
L(1!) = 1
Thus L(96!) = Last Digit of [ 8 x 6 x 1 ] = 6 - 2 years agoHelpfull: Yes(0) No(0)
TCS Other Question