# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
19745 |
2016-02-25T05:14:20 Z |
jeapi |
괄호 (kriii4_R) |
C++ |
|
6 ms |
9528 KB |
#include<iostream>
using namespace std;
typedef long long ll;
ll D[1000001];
int main() {
ll N, T;
cin >> N >> T;
for (int i = 2; i <= N; i++) {
if (i % 2 == 0) {
D[i] = (D[i - 1] * T) % 1000000007;//닫고
D[i] = (D[i] + D[i - 1]) % 1000000007;//열고
}
else {
D[i] = (D[i - 1] * T) % 1000000007;//닫고
D[i] = (D[i] + (D[i - 1] - T)) % 1000000007;//열고
}
}
cout << D[N] << endl;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
6 ms |
9528 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Halted |
0 ms |
0 KB |
- |