# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
19813 | jihoon | 괄호 (kriii4_R) | C++98 | 6 ms | 16708 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<cstdio>
#define je 1000000007
long long fibo[2000001];
int main(){
int n,k;
long long now=1,r,c,ans=0;
scanf("%d %d",&n,&k);
fibo[0]=1;fibo[1]=k;
for(int i=2;i<=n;i++){
fibo[i]=fibo[i-2];
fibo[i]+=fibo[i-1];
fibo[i]%=je;
fibo[i]*=k;
fibo[i]%=je;
}
printf("%lld\n",fibo[n]);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |