做题了做题了!简单的,但我想要大家的牛逼算法。
帖子 由 none » 29 分钟前
What is the least number of consecutive positive integers starting with 1 that must be multiplied together to get a multiple of 20^21?
【转载】做题了做题了!简单的,但我想要大家的牛逼算法。
版主: huangchong
Re: 【转载】做题了做题了!简单的,但我想要大家的牛逼算法。
是不是问最小的,能被20^21整除的n!是几?huangchong 写了: 2022年 7月 25日 22:36 做题了做题了!简单的,但我想要大家的牛逼算法。
帖子 由 none » 29 分钟前
What is the least number of consecutive positive integers starting with 1 that must be multiplied together to get a multiple of 20^21?
Re: 【转载】做题了做题了!简单的,但我想要大家的牛逼算法。
分解成质数因子之后,需要42个2, 21个5,那可以直接数。每10个数字里有两个带因子5,5个数字带因子2。2的密度很高,所以实质是数前n个自然数里第一次有21个因子5是什么数字。
但是需要注意25的倍数 带两个5,125的倍数带三个5。所以并不需要等到105 才能凑齐21个5。 应该是数到90就有21个5 了。
结论是这题实际比较像小学题,考的是认真仔细。理论不难,难点是很容易忽视25带两个5 这个事情。