myCode
-
PolynomialRootmyCode/ShortestCodeChallenge 2016. 4. 6. 20:25
https://codefights.com/challenge/weNspy2jEkhc6aBq9 You are given a list of coefficients of a polynomial and its possible root. The length of the list is equal to the degree of the polynomial - 1, and the constant term of the polynomial is the last element of the list (i.e. polynomial[len(polynomial) - 1]).Find out if the given number is a root of the polynomial.ExampleFor polynomial = [1,-20,150..