| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 135050 | 晏莞煜 | x的n次方 | C++ | Accepted | 3 MS | 272 KB | 254 | 2025-11-02 12:00:48 |
#include<iostream> using namespace std; long long x_n(int x,int n){ if(n==0){ return 1; } if(x==0){ return 0; } if(n==1){ return x; } return x * x_n(x,n-1); } int main(){ int x,n; cin>>x>>n; cout<<x_n(x,n); return 0; }