【转载】做题了做题了!简单的,但我想要大家的牛逼算法。

版主: huangchong

回复
头像
huangchong(净坛使者)楼主
论坛元老
论坛元老
2023-24年度优秀版主
帖子互动: 3694
帖子: 57365
注册时间: 2022年 7月 22日 01:22

【转载】做题了做题了!简单的,但我想要大家的牛逼算法。

帖子 huangchong(净坛使者)楼主 »

做题了做题了!简单的,但我想要大家的牛逼算法。
帖子 由 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(净坛使者)楼主
论坛元老
论坛元老
2023-24年度优秀版主
帖子互动: 3694
帖子: 57365
注册时间: 2022年 7月 22日 01:22

Re: 【转载】做题了做题了!简单的,但我想要大家的牛逼算法。

帖子 huangchong(净坛使者)楼主 »

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?
是不是问最小的,能被20^21整除的n!是几?
头像
huangchong(净坛使者)楼主
论坛元老
论坛元老
2023-24年度优秀版主
帖子互动: 3694
帖子: 57365
注册时间: 2022年 7月 22日 01:22

Re: 【转载】做题了做题了!简单的,但我想要大家的牛逼算法。

帖子 huangchong(净坛使者)楼主 »

huangchong 写了: 2022年 7月 25日 22:41 是不是问最小的,能被20^21整除的n!是几?
分解成质数因子之后,需要42个2, 21个5,那可以直接数。每10个数字里有两个带因子5,5个数字带因子2。2的密度很高,所以实质是数前n个自然数里第一次有21个因子5是什么数字。

但是需要注意25的倍数 带两个5,125的倍数带三个5。所以并不需要等到105 才能凑齐21个5。 应该是数到90就有21个5 了。


结论是这题实际比较像小学题,考的是认真仔细。理论不难,难点是很容易忽视25带两个5 这个事情。
回复

回到 “肚皮舞运动(Joke)”