Tuesday, December 31, 2019

Polynomials - Hacker Rank Solution

Polynomials - Hacker Rank Solution

     This can be solved using the polyval tool.

import numpy
P  = map(float, raw_input().split())
x = float(raw_input())
print numpy.polyval(P, x)

No comments:

Post a Comment

Powered by Blogger.