Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

-1 byte by swapping the argument order, removing a space
Source Link
Surculose Sputum
  • 8.4k
  • 1
  • 14
  • 40

Python 3, (削除) 51 49 (削除ここまで) 4948 bytes

Input: ka, ap, pk. The format for the polynomials a and p is a list of coefficients, in order of highest to lowest degree.

lambda klambda*p,*pk:numpy.polydiv(*p)[0][~k]
import numpy

Try it online! Try it online!

Python 3, (削除) 51 (削除ここまで) 49 bytes

Input: k, a, p. The format for the polynomials a and p is a list of coefficients, in order of highest to lowest degree.

lambda k,*p:numpy.polydiv(*p)[0][~k]
import numpy

Try it online!

Python 3, (削除) 51 49 (削除ここまで) 48 bytes

Input: a, p, k. The format for the polynomials a and p is a list of coefficients, in order of highest to lowest degree.

lambda*p,k:numpy.polydiv(*p)[0][~k]
import numpy

Try it online!

-2 bytes
Source Link
Surculose Sputum
  • 8.4k
  • 1
  • 14
  • 40

Python 3, 51(削除) 51 (削除ここまで) 49 bytes

PolynomialInput: k, a, p. The format for the polynomials a and p is represented as a list of coefficients, in order of largest degreehighest to smallestlowest degree.

lambda a,p,k,*p:numpy.polydiv(a,p*p)[0][~k]
import numpy

Try it online! Try it online!

Python 3, 51 bytes

Polynomial is represented as a list of coefficients, in order of largest degree to smallest degree.

lambda a,p,k:numpy.polydiv(a,p)[0][~k]
import numpy

Try it online!

Python 3, (削除) 51 (削除ここまで) 49 bytes

Input: k, a, p. The format for the polynomials a and p is a list of coefficients, in order of highest to lowest degree.

lambda k,*p:numpy.polydiv(*p)[0][~k]
import numpy

Try it online!

Source Link
Surculose Sputum
  • 8.4k
  • 1
  • 14
  • 40

Python 3, 51 bytes

Polynomial is represented as a list of coefficients, in order of largest degree to smallest degree.

lambda a,p,k:numpy.polydiv(a,p)[0][~k]
import numpy

Try it online!

AltStyle によって変換されたページ (->オリジナル) /