You are viewing a single comment's thread. Return to all comments →
My compact solution, easily a one-liner when ignoring the import statement…
import
import numpy as np print(np.polyval(np.loadtxt([input()], float), int(input())))
I see others cast x as float. It worked fine for me as int. Go figure!
x
float
int
Seems like cookies are disabled on this browser, please enable them to open this website
Polynomials
You are viewing a single comment's thread. Return to all comments →
My compact solution, easily a one-liner when ignoring the
import
statement…I see others cast
x
asfloat
. It worked fine for me asint
. Go figure!