# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
3102 | 2013-08-25T07:26:51 Z | ainta | Following Flow (kriii1_F) | C++ | 0 ms | 1088 KB |
#include<stdio.h> long long Mod=1000000007,n,k,i,a,S=1,F=1; int main() { scanf("%lld",&n); for(i=1;i<=n;i++){ scanf("%lld",&k); k--; a=a*i+k; a%=Mod; printf("%lld\n",a+S); F*=i; S+=F; F%=Mod; S%=Mod; } }
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 1088 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |