# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
19723 |
2016-02-25T04:58:20 Z |
joojis |
괄호 (kriii4_R) |
C++14 |
|
4 ms |
3944 KB |
#include <cstdio>
#include <vector>
#define MOD (1000000007)
main ()
{
int N, K;
scanf("%d %d", &N, &K);
std::vector<long long unsigned> A(N+1, 0);
A[0] = 1;
A[1] = K;
for (unsigned i=2; i<=N; i++) {
A[i] = (A[i-1]*K + A[i-2]*K) % MOD;
}
printf("%llu ", A[N]);
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
4 ms |
3944 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Halted |
0 ms |
0 KB |
- |