# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
19734 |
2016-02-25T05:05:34 Z |
panda959595 |
괄호 (kriii4_R) |
C++ |
|
4 ms |
4796 KB |
#include <string>
#include <cmath>
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <list>
#include <stdio.h>
#include <string.h>
using namespace std;
int main()
{
vector<int> a;
int n;
int k;
cin >> n >> k;
a.push_back(1);
a.push_back(k);
int num;
for (int i = 2; i <= n; i++)
{
num = (a[i - 1] + a[i - 2])*k % 1000000007;
a.push_back(num);
}
cout << a[n] << endl;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
4 ms |
4796 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Halted |
0 ms |
0 KB |
- |