Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
123168 任艺宸 输出回文数 C++ Compile Error 0 MS 0 KB 483 2025-06-28 12:21:47

Tests(0/0):


Code:

#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; int main(){ int a,i=0,j=0,n,num=0; cin>>n; for(i=1;i<=n;i++){ num=0; j=i; with(j){ a=j%10; j/=10; num=num*10+a; } if(num==i)cout<<num<<endl; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:13:12: error: 'with' was not declared in this scope
      with(j){
            ^
Main.cc:8:9: warning: unused variable 'a' [-Wunused-variable]
     int a,i=0,j=0,n,num=0;
         ^