WWW Spoj Com Problems PIBO
WWW Spoj Com Problems PIBO
STATUS
RANKS
DISCUSS
JOBS
sign in
Status
Ranking
pdfcrowd.com
Input
First line of input contains two integer n and d (0 n 109, 0 d 100), d is the degree
of polynomial.
The second line contains d+1 integers c0,c1 cd, represent the coefficient of the
polynomial(Thus P(x) can be written as cixi). 0 ci 100 and cd 0 unless d = 0.
Output
A single integer represents the answer.
Example
Input:
10 0
0
Output:
89
Input:
10 0
1
Output:
177
Input:
100 1
1 1
Output:
343742333
pdfcrowd.com
Submit solution!
hide comments
Problem Solver:
2011-11-12 01:16:02
2011-11-12 00:35:25
pdfcrowd.com
Submit solution!
Added by:
Date:
Time limit:
Source limit:
Memory limit:
Cluster:
Languages:
Bin Jin
2011-11-11
1s
10240B
1536MB
Cube (Intel Pentium G860
3GHz)
All except: C++ 5
pdfcrowd.com
pdfcrowd.com