teamnote default

This commit is contained in:
2026-06-03 09:20:51 +09:00
commit f50ed902fe
65 changed files with 6033 additions and 0 deletions

12
source/Math/Harmonic.cpp Normal file
View File

@@ -0,0 +1,12 @@
ll harmonic(ll n) {
ll ans = 0;
for(ll i = 1; i <= n; i = n/(n/i)+ 1) {
//for j \in [i, n/(n/i)] : n/j == n/i
ans += n/i * (n/(n/i) - i + 1);
// \sum_{i=1}^n {f(n/i)}
// ans += f(n/i) * (n/(n/i) - i + 1)
}
return ans;
}