Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
217 | 邓小龙 | x的n次方 | C++ | Accepted | 0 MS | 260 KB | 312 | 2022-07-22 10:06:27 |
#include<iostream> #include<cstdio> #include<string> #include<iomanip> #include<cmath> using namespace std; long long cifang(int x,int n) { if(n==0) return 1; else return cifang(x,n-1)*x; } int main(){ int p,y; cin>>p>>y; cout<<cifang(p,y); return 0; }