HBC52037签到题,思维Irreducible Polynomial题解

淫家是湿人 算法基础篇 49 0
题库丰富多样,涵盖各个领域,全网最全C++题库,让您在练习中不断成长!
In mathematics, a polynomial is an expression consisting of variables and coefficients, that involves only the operations of addition, subtraction, multiplication, and non-negative integer exponents of variables. For example, x2+4x+7x^2 + 4x + 7x2+4x+7. A polynomial is said to be irreducible if it cannot be factored into two or more non-trivial polynomials with real coefficients. For example, x2+1x^2+1x2+1 is irreducible, but x22x+1x^2-2x+1x22x+1 is not . Given a polynomial of degree nn nwith integer coefficients: anxn+an1xn1+...+a1x+a0a_nx^n+a_{n-1}x^{n-1}+...+a_1x+a_0anxn+an1xn1+...+a1x+a0, you need to check whether it is irreducible or not.

In mathematics, a polynomial is an expression consisting of variables (also called indeterminate) and coefficients, that involves only the operations of addition, subtraction, multiplication, and non-negative integer exponents of variables. For example, x2+4x+7x^2 + 4x + 7x2+4x+7. A polynomial is said to be irreducible if it cannot be factored into two or more non-trivial polynomials with real coefficients. For example, x2+1x^2+1x2+1 is irreducible, but x2−2x+1x^2-2x+1x2−2x+1 is not (since x2−2x+1=(x−1)(x−1)x^2-2x+1=(x-1)(x-1)x2−2x+1=(x−1)(x−1)). Given a polynomial of degree n n n with integer coefficients: anxn+an−1xn−1+...+a1x+a0a_nx^n+a_{n-1}x^{n-1}+...+a_1x+a_0an​xn+an−1​xn−1+...+a1​x+a0​, you need to check whether it is irreducible or not.

HBC52037签到题,思维Irreducible Polynomial题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)

标签: HBC52037签到题 思维Irreducible Polynomial题解