#P9309. [EGOI 2021] Number of Zeros / 零的个数
[EGOI 2021] Number of Zeros / 零的个数
Background
Day 1 Problem A.
Translated from EGOI2021 zeros.
Problem Description
Santa Claus is preparing for Christmas . He wants to buy a positive integer number of gifts so that they can be evenly distributed among all well-behaved children. However, he does not know the exact number of well-behaved children; he only knows that the number is between and . He wants to buy the smallest positive integer number of gifts such that it can be evenly divided among any children.
He has already computed this (possibly very large) number of gifts, but he is not sure whether his computation is correct, so he wants you to do some basic correctness checks. Can you tell him how many trailing zeros the answer has?
Input Format
One line containing two integers .
Output Format
One line containing one integer, the number of trailing zeros of the answer.
1 6
1
10 11
1
Hint
Explanation for Sample
If there may be between and well-behaved children, Santa Claus needs at least gifts (this is the smallest positive integer divisible by ), and has one trailing zero.
Explanation for Sample
If there may be or well-behaved children, Santa Claus will buy gifts.
Constraints
For all testdata, .
- Subtask 1 ( points): .
- Subtask 2 ( points): .
- Subtask 3 ( points): , .
- Subtask 4 ( points): .
- Subtask 5 ( points): .
- Subtask 6 ( points): no additional constraints.
Translated by ChatGPT 5