UVa 498 - Polly the Polynomial

Summary
Evaluate a polynomial (first line) for all the values of the second line.

Explanation
http://en.wikipedia.org/wiki/Horner%27s_method

Implementations

 * If you use sscanf, you will have to do: bytes_read += bytes and sscanf(Str+bytes_read ...
 * Don't print a space at the end of a line.
 * Don't use doubles or power functions.

Input
-2 5 0 1 6 1 -1 7 6 -1 0 1 2 34 -10 -20 -600 34 2 4 3042 1 239 4782 -2838 23802 10002 2399032 9320932 292920 209209 10192929398 0 1829030 82991

Output
-2 -2 -2 -2 6 5 -2 0 0 0 -1326 -3326 1781440210 -1007394238 -624871718 112038978 1766999308