At the input I get a polynomial as a string,
I want to get its coefficients in variables, but i have no idea gow do this.
example:7x^4+3x^3-6x^2+x-8
.Maximum degree is not known, coefficients are integers.
I will be very grateful for any help.
相关问题
- How to refresh height of a Constrained View in Con
- Android Room Fetch data with dynamic table name
- Access Binding Adapters in multi module project
- How to make request-bound data globally available
- In Vertx I need to redirect all HTTP requests to t
相关文章
- SonarQube: How to suppress a warning in Kotlin cod
- What are the `^let` annotations in Android Studio
- Create Custom Dagger 2 Scope with Kotlin
- Android Studio 3.5 ERROR: Unable to resolve depend
- Kotlin inlined extension property
- Kotlin Koans with EduTools plugin: “Failed to laun
- “lateinit” or “by lazy” when defining global andro
- Convert java to kotlin on paste
Split by plus and minus (e.g. with re.split), preserving the signs in the results. Then for each substring, split by "x" to get the leading coefficient (+1 and -1 are special cases), and take note of missing powers of x (i.e. coefficient 0).