# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
19910 |
2016-02-25T06:59:20 Z |
inspire12 |
괄호 (kriii4_R) |
C++ |
|
2000 ms |
8696 KB |
/*
* pro1.cpp
*
* Created on: 2016. 2. 25.
* Author: SeoYoungHak
*/
#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <cstdio>
using namespace std;
int dynamic(int n,int k){
if(n==1){
return k;
}
if(n==0){
return 1;
}
return k*dynamic(n-2,k)+k*dynamic(n-1,k);
}
int main()
{
int mode = 1000000007;
int n,k;
scanf("%d %d",&n,&k);
int ans = dynamic(n,k);
printf("%d",ans%mode);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2000 ms |
8696 KB |
Program timed out |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Halted |
0 ms |
0 KB |
- |