破结论没听说过,上式推导到第三步的时候有了O(nlogn) 的做法(枚举倍数+1最后前缀和),并且这种做法可以直接应用到向上取整的计算中,详见forever97 但由于d(n)是积性函数,故可O(n)求 代码参考这里 #include <bits/stdc++.h> using namespace std; #define LL long long const int N = 1e6+5; const LL MOD = 1e9+7; LL f[N], g[N]; void init() { f…
Battlestation Operational Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Problem Description > The Death Star, known officially as the DS-1 Orbital Battle Station, also known as the Death Star I, the First Death S…
题目链接 Problem Description The Death Star, known officially as the DS-1 Orbital Battle Station, also known as the Death Star I, the First Death Star, Project Stardust internally, and simply the Ultimate Weapon in early development stages, was a moon-si…
Problem Description > The Death Star, known officially as the DS-1 Orbital Battle Station, also known as the Death Star I, the First Death Star, Project Stardust internally, and simply the Ultimate Weapon in early development stages, was a moon-siz…
Distinct Values Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2298 Accepted Submission(s): 740 Problem Description Chiaki has an array of n positive integers. You are told some facts about…