| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 137800 | 田祥江 | 输出回文数 | C++ | Compile Error | 0 MS | 0 KB | 219 | 2025-11-22 17:19:57 |
#include<bits/stdc++.h> using namespace std; int main(){ int n; scanf("%d",&n); for(int i=1;i<=n;i++){ k=i; m=0; while(k>0){ m=m*10+k%10; k /=10; } if(m==i) printf("%d\n",i) return 0; }
Main.cc: In function 'int main()':
Main.cc:7:3: error: 'k' was not declared in this scope
k=i;
^
Main.cc:8:3: error: 'm' was not declared in this scope
m=0;
^
Main.cc:14:2: error: expected ';' before 'return'
return 0;
^
Main.cc:15:1: error: expected '}' at end of input
}
^
Main.cc:5:16: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
^