Advertisement
MegaVerkruzo

Untitled

Oct 28th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. #include <math.h>
  4. #include <algorithm>
  5. #include <vector>
  6. #include <cstdio>
  7.  
  8. using namespace std;
  9.  
  10. int main() {
  11. //freopen("input.txt", "r", stdin);
  12. long long a, b, c, d;
  13. cin >> a >> b >> d >> c;
  14. for (int k = max(0.0, ceil((double) (a - d) / c)); k <= (b - d) / c && (b - d) >= 0; ++k) {
  15. cout << k * c + d << " ";
  16. }
  17. return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement