You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
245 B
16 lines
245 B
2 years ago
|
#include <bits/stdc++.h>
|
||
|
|
||
|
using namespace std;
|
||
|
|
||
|
int power(int a, int b) {
|
||
|
if (b == 1) return a;
|
||
|
return power(a, b - 1) * a;
|
||
|
}
|
||
|
|
||
|
int main() {
|
||
|
int a, b;
|
||
|
cin >> a >> b;
|
||
|
cout << power(a, b) << endl;
|
||
|
return 0;
|
||
|
}
|