Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
218 | Benson | x的n次方 | C++ | Accepted | 0 MS | 268 KB | 295 | 2022-07-22 10:06:33 |
#include<iostream> #include<cstring> #include<cmath> using namespace std; long long quhe(int x,int n) { if(n==0) { return 1; } else { return quhe(x,n-1)*x; } } int main() { int n,m; cin>>n>>m; cout<<quhe(n,m); return 0; }