Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
103829 | 刘慕莀 | x的n次方 | C++ | Accepted | 1 MS | 272 KB | 197 | 2024-12-29 15:19:27 |
#include<bits/stdc++.h> using namespace std; long long f(int x,int n) { if(n==0) { return 1; } return f(x,n-1)*x; } int main(){ int n,x; cin>>x>>n; cout<<f(x,n); return 0; }