| 2026 Spring UT CS104c Midterm #1 |
|---|
| Закончено |
You've studied how to count the number of 0 digits at the end of $$$n!$$$. But that was for numbers written in decimal. Real computer scientists think in binary! How many 0 digits are at the end of $$$n!$$$ when the result is expressed in binary?
The only line of input contains a single integer $$$n$$$ $$$(1 \leq n \leq 10^6).$$$ (Note that this integer is written in decimal, not binary.)
Print the number of 0 digits at the end of $$$n!$$$, when this integer is written in binary.
1
0
8
7
1000000
999993
Factorials grow very quickly. Any solution that requires computing $$$n!$$$ as a first step will probably not work here!
| Название |
|---|


