Sifar
InterviewTime limit1sMemory limit128 MB
For each N up to 1,000,000 given one per line until 0, print the count of trailing zeros of N! as Case #x: M.
- Level
Easy3 of 10
- Topics
- Number theory, Math
- Solved
- No attempts yet
Problem
Given , print the largest such that is divisible by .
Input
The input has several lines. Each line holds one integer with . The last line holds , and that line is not a test case.
Output
For each test case, print the largest on its own line in the form Case #x: M. Here is the test case number and it starts at 1.
Hint
Sifar is said to mean zero in Malay.