Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- p(x) = 2 + 3x + 5x⁴
- general:
- p(x) = ∑ aᵢxⁱ
- given k and p(k)
- aᵢ = (p(k)/kⁱ) mod k (using integer division)
- The condition of the coefficients being smaller than k was a strong hint towards being able to divide through k to safely pop of the coefficients one by one.
Advertisement
Add Comment
Please, Sign In to add comment