# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
3516 | shinhj88 | Inherited disease (kriii1_I) | C++98 | 0 ms | 1088 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<stdio.h>
#define P 1000000007
int main(){
long long d, i, di, a=1, b, t, t1=0, t2=1;
scanf("%lld", &d);
for(i=1;i<=d;++i){
scanf("%lld", &di);
b=((a-1)*i+di)%P;
printf("%d\n", (b+t1)%P);
t1=(t1+t2)%P;
t2=(t2*(i+1))%P;
a=b;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |