返回题库

AIME 1992 · 第 15 题

AIME 1992 — Problem 15

专题
Contest Math
难度
L4
来源
AIME

题目详情

Problem

Define a positive integer nn^{}_{} to be a factorial tail if there is some positive integer mm^{}_{} such that the decimal representation of m!m! ends with exactly nn zeroes. How many positive integers less than 19921992 are not factorial tails?

解析

Solution

Let the number of zeros at the end of m!m! be f(m)f(m). We have f(m)=m5+m25+m125+m625+m3125+f(m) = \left\lfloor \frac{m}{5} \right\rfloor + \left\lfloor \frac{m}{25} \right\rfloor + \left\lfloor \frac{m}{125} \right\rfloor + \left\lfloor \frac{m}{625} \right\rfloor + \left\lfloor \frac{m}{3125} \right\rfloor + \cdots.

Note that if mm is a multiple of 55, f(m)=f(m+1)=f(m+2)=f(m+3)=f(m+4)f(m) = f(m+1) = f(m+2) = f(m+3) = f(m+4).

Since f(m)m5+m25+m125+=m4f(m) \le \frac{m}{5} + \frac{m}{25} + \frac{m}{125} + \cdots = \frac{m}{4}, a value of mm such that f(m)=1991f(m) = 1991 is greater than 79647964. Testing values greater than this yields f(7975)=1991f(7975)=1991.

There are 79755=1595\frac{7975}{5} = 1595 distinct positive integers, f(m)f(m), less than 19921992. Thus, there are 19911595=3961991-1595 = \boxed{396} positive integers less than 19921992 that are not factorial tails.

Solution 2

After testing various values of mm in f(m)f(m) of solution 1 to determine mm for which f(m)=1992f(m) = 1992, we find that m{7980,7981,7982,7983,7984}m \in \{7980, 7981, 7982, 7983, 7984\}. WLOG, we select 79807980. Furthermore, note that every time kk reaches a multiple of 2525, k!k! will gain two or more additional factors of 55 and will thus skip one or more numbers.

With this logic, we realize that the desired quantity is simply 798025+7980125\left \lfloor \frac{7980}{25} \right \rfloor + \left \lfloor \frac{7980}{125} \right \rfloor \cdots, where the first term accounts for every time 11 number is skipped, the second term accounts for each time 22 numbers are skipped, and so on. Evaluating this gives us 319+63+12+2=396319 + 63 + 12 + 2 = \boxed{396}. - Spacesam(edited by srisainandan6)