#include <iostream> #include <cstdio> using namespace std; int Reverse(int i){ int reverse=0; while (i>0){ reverse=reverse*10+i%10; i=i/10; } return reverse; } int main(){ for(int i=1000;i<10000;i++){ if(i*9==Reverse(i)){ printf("%d\n",i); } } return 0; }