Submission #3624

# Submission time Handle Problem Language Result Execution time Memory
3624 2013-08-31T07:05:05 Z imsifile Inherited disease (kriii1_I) C++
0 / 1
0 ms 1088 KB
#include<stdio.h>

long long n, x, fr, t, i;

int main(){
	scanf("%lld", &n);
	for(i=0; i<n; i++){
		scanf("%lld", &t);
		x+=fr*(i+1)+t, x%=1000000007;
		fr=fr*(i+1)+t-1, fr%=1000000007;
		printf("%lld\n", x);
	}
	return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 1088 KB Output isn't correct
2 Halted 0 ms 0 KB -