Epoka Science Olympiad 2017 - 11th Grade |
Start: May.06.2017 at 10:00:00 AM
Finish: May.06.2017 at 12:30:00 PM
The contest is finished!
• Contest scoreboard
|
Feedback | If you notice incorrect translations in Contester, please let author know.
|
|
Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Factorial
Question:
Here's a challenge that's a bit more mathematical in nature. Write a program that determines the number of trailing zeros at the end of X! (X factorial), where X is an arbitrary number. For instance, 5! is 120, so it has one trailing zero. (How can you handle extremely values, such as 100!?)
Input specification:
You will be given one integer (X) where
1 ≤ X ≤ 30,000.
Output specification:
Show the number of trailing zeros at the end of X!.
Sample Inputs |
Sample Outputs |
100
1000
100000
300000
400000
|
24
249
24999
74998
99999
|
Для отправки решений необходимо выполнить вход.
|