# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
18597 | eaststar | Inherited disease (kriii1_I) | C++14 | 0 ms | 1084 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <stdio.h>
#define M 1000000007
int main(){
int i,n,k;
long long s=0,t=1,u=0;
scanf("%d%d",&n,&k);
puts("1");
for(i=1;i<n;++i){
scanf("%d",&k);
t=t*i%M;
s=(s+t)%M;
u=(u*(i+1)+k-1)%M;
printf("%d\n",(s+u+1)%M);
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |