ICode9

精准搜索请尝试: 精确搜索
  • NC218398 小G的约数2022-07-16 14:05:05

    https://ac.nowcoder.com/acm/problem/218398 数论分块 在1~x 内,因数为 i 的数有 x/i 个,则约数和就是 x/i * i。 则G(n)就是 \[\sum_{i=1}^n i\times \lfloor \frac{n}{i} \rfloor \] 点击查看代码 #include <bits/stdc++.h> using namespace std; #define int long long int G(

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有