Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
159690 张晓冉 求x的n次方 C++ Accepted 1 MS 272 KB 223 2026-09-06 14:37:05

Tests(2/2):


Code:

#include<bits/stdc++.h> using namespace std; int a(int n,int x){ if(x == 0){ return 1; } return n*a(n,x-1); } int main(){ int n,x; cin>>n>>x; cout<<a(n,x)<<endl; return 0; }