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