跳至内容
CVBB ACM Team
用户工具
注册
登录
站点工具
搜索
工具
显示页面
修订记录
Copy this page
导出 PDF
反向链接
最近更改
媒体管理器
网站地图
注册
登录
>
最近更改
媒体管理器
网站地图
您在这里:
front_page
»
2020-2021
»
teams
»
wangzai_milk
»
wzx27
»
pe
»
401
2020-2021:teams:wangzai_milk:wzx27:pe:401
本页面只读。您可以查看源文件,但不能更改它。如果您觉得这是系统错误,请联系管理员。
题目连接:[[https://projecteuler.net/problem=401]] === 题意 === 定义函数$sigma2:x \mapsto x所有因数的平方和$,求$\sum_{i=1}^{n}sigma2(i)$对$m$取模,其中$n=10^{15},m=10^9$。 === 题解 === 考虑每个因数$k$的贡献$k^2$,那么 $$ 原式=\sum_{i=1}^{n} \left \lfloor \frac{n}{i} \right \rfloor \times i^2 = \sum_{i=1}^{\left \lfloor \frac{n}{\sqrt n+1} \right \rfloor } (\left \lfloor \frac{n}{i} \right \rfloor \times i^2) \; +\; \sum_{i=1}^{\sqrt n} (f( \left \lfloor \frac{n}{i} \right \rfloor ) - f( \left \lfloor \frac{n}{i+1} \right \rfloor )) $$ 其中$f(k)=\sum_{i=1}^{k}i^2=\frac{k(k+1)(2k+1)}{6}$
2020-2021/teams/wangzai_milk/wzx27/pe/401.txt
· 最后更改: 2020/05/25 10:32 由
wzx27
页面工具
显示页面
修订记录
反向链接
Copy this page
导出 PDF
回到顶部