Polynomials - Hacker Rank Solution
This can be solved using the polyval tool.
polyval
import numpy P = map(float, raw_input().split()) x = float(raw_input()) print numpy.polyval(P, x)
No comments:
Post a Comment