# Given x find a polynomial such that pol(x)=a for a known a?

You are given x,a. Find a polynomial p(y) with the leading coafficent 1 such that p(x)=a. How to write an algorithem to solve this efficently? I have no idea where to start

• What did you try? Where did you get stuck? We're happy to help you understand the concepts but just solving exercises for you is unlikely to achieve that. You might find this page helpful in improving your question. We discourage "here is an exercise-style task, I don't know where to start" style questions.
– D.W.
Jul 3 at 15:59

Choose $$p(y):=y + (a-x)$$
$$x$$ and $$a$$ here are the constants you are given.