# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
22201 | 2017-04-29T17:45:30 Z | 내일 시험이에요(#1036, pjh0123) | None (KRIII5P_2) | C++11 | 0 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--){ int x; scanf("%d",&x); if(i==0)printf("%d\n",x); x%=p; a[i%(p-1)]+=x; a[i%(p-1)]%=p; } for(int i=1;i<p;i++){ int s = 0; int x = 1; for(int j=0;j<p-1;j++){ s = (s + x*a[j])%p; x = x*i%p; } printf("%d\n",s); } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 5060 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 5060 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |