# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
22659 | 현우야 이거 플로우야 (#40) | Fully Generate (KRIII5_FG) | C++98 | 13 ms | 8928 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 MOD 1000000007
long long int num[1000050];
long long int ans = 1;
int main(){
int n = 0;
//freopen("input.txt","r",stdin);
scanf("%d",&n);
for(int i = 1; i <= n; i++){
num[i] = 1 + num[i - num[num[i-1]]];
num[i]%=MOD;
ans *= num[i];
ans%=MOD;
}
printf("%lld",ans);
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |