这道题其实算是把快速幂的思想用在多项式之中 A+A^2+A^3+…+A^n=(A+A^1…+A^[n/2])+A^[n/2](A+A+A^1…+A^[n/2])+n mod 2*A^n 然后就是打码的问题了 ..,..] of longint; d:..] of longint; i,j,n,m,p:longint; procedure mul; var i,j,k:longint; begin to n do to n do begin c[i,j]:=; to n do c[i,j]:=(c…