#include<iostream> #include<vector> #include<algorithm> #include<cstring> constint maxn = 1e5 + 5; usingnamespace std; #define int long long signedmain() { int n, k; cin >> n >> k; int sum = n * k; for (int l = 1, r = 0; l <= n; l = r + 1) { if (k / l == 0) r = n; else r = k / (k / l); if (r > n) r = n; int base = k / l; sum -= (base * l + base * r) * (r - l + 1) / 2; } cout << sum << endl; return0; }