Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
137812 田祥江 输出回文数 C++ Compile Error 0 MS 0 KB 222 2025-11-22 17:22:05

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int n,k,m; 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; }


Run Info:

Main.cc: In function 'int main()':
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);
                ^