n^2+n-1=0
n^2+n=1
n^2=1-n
n^3+2n^2+2002
=n*(1-n)+2*(1-n)+2002
=(2+n)*(1-n)
=2-2n+n-n^2
=2-n-n^2+2002
=2-(n+n^2)+2002
因为n+n^2=1
所以2-1+2002
=1+2002
=2003
n^2+n-1=0
n^2+n=1
n^2=1-n
n^3+2n^2+2002
=n*(1-n)+2*(1-n)+2002
=(2+n)*(1-n)
=2-2n+n-n^2
=2-n-n^2+2002
=2-(n+n^2)+2002
因为n+n^2=1
所以2-1+2002
=1+2002
=2003