Submission #3624

#TimeUsernameProblemLanguageResultExecution timeMemory
3624imsifileInherited disease (kriii1_I)C++98
0 / 1
0 ms1088 KiB
#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 timeMemoryGrader output
Fetching results...