Advertisement
IISergeyII

Untitled

May 26th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. #include <string>
  4. #include <algorithm>
  5.  
  6. using namespace std;
  7.  
  8.  
  9. int main()
  10. {
  11.     int a, b, c, d;
  12.     cin >> a >> b >> c >> d;
  13.  
  14.  
  15.     for (int x = -100; x <= 100; ++x) {
  16.         int x2 = x*x, x3 = x2*x;
  17.         if (a*x3*1LL + b*x2*1LL + c*x*1LL + d == 0) cout << x << " ";
  18.     }
  19.  
  20.  
  21.  
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement