Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
103769 | 石晋骁 | x的n次方 | C++ | Compile Error | 0 MS | 0 KB | 242 | 2024-12-29 15:13:28 |
#include<bits/stdc++.h> using namespace std; long long nl_t(int a,int b){ if(a == 0){ return 0; } if(b == 0){ return 1; } return x*nl_t(x,n-1); } int main(){ int a,b; cin >> a >> b; cout << nl_t(a,b); return 0; }
Main.cc: In function 'long long int nl_t(int, int)': Main.cc:10:9: error: 'x' was not declared in this scope return x*nl_t(x,n-1); ^ Main.cc:10:18: error: 'n' was not declared in this scope return x*nl_t(x,n-1); ^