Solved by 64 users: ...
UserDateAttemptTimeCMSC
NIGHTFIT`17 jun 2013`C++1600.05141
WsemirZ`14 mar 2009`C1000.21143
mikl`20 aug 2007`C++500.05153
WsemirZ`14 mar 2009`C900.21153
NIGHTFIT`17 jun 2013`C++1500.04156
WsemirZ`14 mar 2009`Kylix200.20157
NIGHTFIT`07 jul 2011`C++700.04158
NIGHTFIT`07 jul 2011`C++800.04158
vi002`17 jul 2007`Ruby1809.05161
Robert_Gerbicz`08 jun 2008`C200.04165
NIGHTFIT`17 jun 2013`C++1300.04166
tomek`28 feb 2007`C++1500.14176
Robert_Gerbicz`08 jun 2008`C300.04191
popo`26 feb 2009`C++400.05197
dan`27 apr 2007`C++100.27203
Vasyl`30 sep 2008`C++900.06205
DAV`02 jun 2009`C++1300.04215
vi002`16 jul 2007`Ruby1003.72232
 C++ 56 C 4 Kylix 3 Java 2 Ruby 1 Python 1 FPC 1
` >  >  >  >  >  >  >  >  >  > `

## Polynom modulo P.

Time limit = 2 second(s)

You are given prime number P and P numbers A(0) .. A(P-1). You should find polynom Q(x) of degree P — 1 (or less):
• 1) Q(x) = A(x) mod P, x = 0, 1, ..., P-1.
• 2) all coefficients are integers from the set {0,1,...P-1}.

Input The first line contains P, 1 ≤ P ≤ 1000. The second line contains P values A(0), A(1), ..., A(P-1).

Output You should print P coefficients of the polynom starting from the lowest.

 Input#1```5 0 1 2 3 4 ``` Output#1```0 1 0 0 0 ```
 Input#2```5 4 3 2 1 0 ``` Output#2```4 4 0 0 0 ```

Author:
Known problem. Tests and description --
9 December 2006

 © acm.mipt DevGroupThe page was generated in 180ms