Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
102468 | 王思颜 | x的n次方 | C++ | Wrong Answer | 1 MS | 268 KB | 253 | 2024-12-21 17:03:22 |
#include<bits/stdc++.h> using namespace std; int mp(int a,int b,int x,int n){ if (n <= b){ x = x * a; n++; mp(a,b,x,n); } else{ return x; } } int main() { int a,b,x = 1,n = 1; cin>>a>>b; cout<<mp(a,b,x,n); return 0; }
------Input------
-2 49
------Answer-----
-562949953421312
------Your output-----
0