Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a,b,c,d,f=map(int, input().split())
- i=1
- ans=0
- while (ans<5) and (i<100000):
- if ((i**5) + a*(i**4) + b*(i**3) + c*(i**2) + d*i + f)==0:
- print(i)
- ans+=1
- elif ((-i)**5 + a*(i**4) + b*((-i)**3) + c*(i**2) + d*(-i) + f)==0:
- print(-i)
- ans+=1
- i+=1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement