# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
19818 |
2016-02-25T05:55:11 Z |
ilbbke |
괄호 (kriii4_R) |
C++ |
|
0 ms |
1084 KB |
#include<stdio.h>
int main()
{
int n,k;
long long D[5];
scanf("%d%d",&n,&k);
D[0]=1, D[1]=k;
for(int i=2; i<=n; i++) D[i%3]=((D[(i-1)%3]+D[(i-2)%3])*k)%1000000007;
printf("%lld\n",D[n%3]);
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1084 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Halted |
0 ms |
0 KB |
- |