Saturday, May 13, 2006
Time since last post
SCORE SO FAR
- Total puzzles posted: 26
- Puzzles solved so far: 24
- Moderator Involved: 6
- Bobach: 5
- Kala Ramachandra: 5
- Balaji: 4
- Vikram: 3
- Kavya: 2
- Sanjay: 2
- Mayura: 2
- Ishan: 1
- Steve: 1
- Dinesh: 1
- Victor Matheus: 1
- Amit Sarda: 1
- Ram: 1
- Vidya Vaidyanathan: 1
- Aditi Limaye: 1
- Ajit: 1
- Tejas: 1
- Abracadabra: 1
Puzzles yet to be completed
Puzzles with most comments
Previous Posts
- What's so strange about me?
- Playing quarters with the devil
- Name the hidden card
- Am I red, or Am I blue?
- Hands of a clock
- What's our average salary?
- Survivor of the pirates
- Village 'Adultery'
- The drunken jail guard
- The crazy juror
Subscribe to
Posts [Atom]
2 Comments:
Lets consider the first occurrence of a trailing 0 in n! which happens at 5! (5!=120) and from then on until 9! every n! has one trailing zero. Later on a 10! produces an additional 0, so does 15! So every multiple of 5 produces an additional 0. The trouble is that 25!=25*24*23! has two zeros more than 23! or 24!.
So, we need to count the number of times each number is completely divided by 5 and keep incrementing that.
So 100! has 20 zeros (20 multiples of 5) + 4 zeros (4 multiples of 25) i.e. a total of 24 zeros.
For any n: it can be generalized as ceil(n/5)+ceil(n/5^2)+.... until n>=5^k
Sanjay,
Interesting solution. I think you cracked it right.
Excellent! Think about a scenario if the number of 0's in the result is asked instead of the trailing 0's. Hmm, that would be toasty! But for now This puzzle is SOLVED!
Subscribe to Post Comments [Atom]
<< Home