There are two polynomial equations f(x) and g(x).
f(x)=(am xm+a(m-1) x(m-1)+⋯+a1 x1+a0 x0)n
g(x)=cp xp+c(p-1) x(p-1)+⋯+c1 x1+c0 x0
,where n,m,p∈N,0≤p<100.
In this problem, we define g(x) as the expand form of f(x). For example, if f(x)=(x+3)2, then g(x)= x2+6x+9.
Note that all the coefficients are integers.
m
am a(m-1) … a1 a0
n
cp c(p-1) … c1 c0
Note that you need to use “%5d” to print answer and there is a new line at the end.