Being a Predictor

问题描述 :

Let A(x) = Sigma(Ai * x^i) (0<=i<=N-1). Given A(1), A(2),…, A(N), You are asked to calculate A(N+1) mod 112233.
It is guaranteed that A(1), A(2), …, A(N), A(N+1) are all integers.
输入:

There are multiple test cases, ended with an EOF.
For each case:
Line 1 contains a positive integer N (N <= 10^6).
Line 2 to Line N+1: each contains a non-negative integer less than 65536. The integer in Line i is A(i-1).
输出:

There are multiple test cases, ended with an EOF.
For each case:
Line 1 contains a positive integer N (N <= 10^6).
Line 2 to Line N+1: each contains a non-negative integer less than 65536. The integer in Line i is A(i-1).
样例输入:

1
18605
5
19543
19998
12266
27854
2103
样例输出:

18605
110887

http://blog.csdn.net/a197p/article/details/46336235

http://xueshu.baidu.com/s?wd=paperuri:(966d88aebcff70e9afb186251ac48710)&filter=sc_long_sign&sc_ks_para=q%3DIs+subjective+well-being+a+predictor+of+nonresponse+in+broad+population+surveys%3F&tn=SE_baiduxueshu_c1gjeupa&ie=utf-8&sc_us=18020486158635111694