# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
22199 | 2017-04-29T17:36:25 Z | 내일 시험이에요(#1036, pjh0123) | None (KRIII5P_2) | C++11 | 1000 ms | 5060 KB |
#include <cstdio> int a[1010101]; int main(){ int n,p; scanf("%d%d",&n,&p); for(int i=n;i>=0;i--){ scanf("%d",&a[i]); a[i]%=p; } for(int i=0;i<p;i++){ int s = 0; int x = 1; for(int j=0;j<=n;j++){ s=(s+x*a[j])%p; x=x*i%p; } printf("%d\n",s); } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 5060 KB | Output is correct |
2 | Correct | 0 ms | 5060 KB | Output is correct |
3 | Correct | 0 ms | 5060 KB | Output is correct |
4 | Correct | 0 ms | 5060 KB | Output is correct |
5 | Correct | 0 ms | 5060 KB | Output is correct |
6 | Correct | 13 ms | 5060 KB | Output is correct |
7 | Correct | 16 ms | 5060 KB | Output is correct |
8 | Correct | 13 ms | 5060 KB | Output is correct |
9 | Correct | 13 ms | 5060 KB | Output is correct |
10 | Correct | 13 ms | 5060 KB | Output is correct |
11 | Correct | 6 ms | 5060 KB | Output is correct |
12 | Correct | 9 ms | 5060 KB | Output is correct |
13 | Correct | 3 ms | 5060 KB | Output is correct |
14 | Correct | 0 ms | 5060 KB | Output is correct |
15 | Correct | 0 ms | 5060 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 5060 KB | Output is correct |
2 | Correct | 0 ms | 5060 KB | Output is correct |
3 | Correct | 0 ms | 5060 KB | Output is correct |
4 | Correct | 0 ms | 5060 KB | Output is correct |
5 | Correct | 0 ms | 5060 KB | Output is correct |
6 | Correct | 13 ms | 5060 KB | Output is correct |
7 | Correct | 16 ms | 5060 KB | Output is correct |
8 | Correct | 13 ms | 5060 KB | Output is correct |
9 | Correct | 13 ms | 5060 KB | Output is correct |
10 | Correct | 13 ms | 5060 KB | Output is correct |
11 | Correct | 6 ms | 5060 KB | Output is correct |
12 | Correct | 9 ms | 5060 KB | Output is correct |
13 | Correct | 3 ms | 5060 KB | Output is correct |
14 | Correct | 0 ms | 5060 KB | Output is correct |
15 | Correct | 0 ms | 5060 KB | Output is correct |
16 | Correct | 199 ms | 5060 KB | Output is correct |
17 | Correct | 216 ms | 5060 KB | Output is correct |
18 | Correct | 239 ms | 5060 KB | Output is correct |
19 | Correct | 279 ms | 5060 KB | Output is correct |
20 | Correct | 353 ms | 5060 KB | Output is correct |
21 | Execution timed out | 1000 ms | 5060 KB | Execution timed out |
22 | Halted | 0 ms | 0 KB | - |