Problem B
Factstone Benchmark
Amtel will use a new benchmark – the Factstone – to advertise the vastly improved capacity of its new chips. The Factstone rating is defined to be the largest integer $n$ such that $n!$ can be represented as an unsigned integer in a computer word.
Given a year $1960 \le y \le 2160$, what will be the Factstone rating of Amtel’s most recently released chip?
Input
There are several test cases. For each test case, there is one line of input containing $y$. A line containing $0$ follows the last test case.
Output
For each test case, output a line giving the Factstone rating.
Sample Input 1 | Sample Output 1 |
---|---|
1960 1981 0 |
3 8 |