| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 148263 | 周润泽 | 累加问题 | C++ | Compile Error | 0 MS | 0 KB | 760 | 2026-02-10 16:33:26 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; void a(int x){ if(x>100)return ; cout<<x++<<endl; a(x); } int main(){ int x=1; a(x); return 0; } #include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; void a(int x){ if(x>100)return ; cout<<x++<<endl; a(x); } int main(){ int x=1; a(x); return 0; }
Main.cc: In function 'void a(int)':
Main.cc:24:6: error: redefinition of 'void a(int)'
void a(int x){
^
Main.cc:7:6: note: 'void a(int)' previously defined here
void a(int x){
^
Main.cc: In function 'int main()':
Main.cc:29:5: error: redefinition of 'int main()'
int main(){
^
Main.cc:12:5: note: 'int main()' previously defined here
int main(){
^