Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
135051 徐英杰 x的n次方 C++ Compile Error 0 MS 0 KB 280 2025-11-02 12:00:57

Tests(0/0):


Code:

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 a,b; cin>>a>>b; cout<<x_n(a,b); return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:15:5: error: 'cin' was not declared in this scope
     cin>>a>>b;
     ^
Main.cc:16:5: error: 'cout' was not declared in this scope
     cout<