Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
219 | 刘家源 | x的n次方 | C++ | Accepted | 0 MS | 264 KB | 312 | 2022-07-22 10:06:39 |
#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; }