Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdio>
- #include <vector>
- #include <algorithm>
- #include <cmath>
- using namespace std;
- int main() {
- freopen("input.txt", "r", stdin);
- long long a, b, k;
- cin >> a >> b >> k;
- long long ans = 0;
- for (long long i = a; i * i * i <= b; ++i) {
- ans += min(b,(long long) sqrt(i * i * i + k)) - max(a, (long long) (sqrt(i * i * i - k) + 0.999));
- }
- cout << ans;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement