Run ID:135052
提交时间:2025-11-02 12:01:06
#include <iostream> using namespace std; int jc(int n) { //递归出口 if (n == 0 || n == 1) { return 1; } //n的阶乘=n*(n-1的阶乘) return n * jc(n-1); } int gcd(int a,int b) { if (a%b == 0) { return b; } return gcd(b,a%b); } long long x_n(int x,int n) { if ( n == 0) { return 1; } if (x == 0) { return 0; } if (n == 1) { return x; } return x * x_n(x,n-1); } int main() { int a,b; cin>>a>>b; cout<<x_n(a,b); return 0; }