Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
206 | ZRH | x的n次方 | C++ | Wrong Answer | 0 MS | 268 KB | 422 | 2022-07-22 09:50:11 |
#include<iostream> //输入函数库 #include<iomanip> #include<cmath> //数学函数库 #include<cstdio> #include<ctime> #include<cstring> #include<cstdlib> #include<string> #include<stdlib.h> #include<sys/time.h> using namespace std; int t(int x,int n){ if(n==1){ return x; } else{ n--; return t(x*x,n); } } int main(){ int x,n; cin>>x>>n; cout<<t(x,n); return 0; }
------Input------
2 10
------Answer-----
1024
------Your output-----
0