题解 | #反序数#
反序数
https://www.nowcoder.com/practice/e0d06e79efa44785be5b2ec6e66ba898
#include<bits/stdc++.h> using namespace std; int main() { int a; int b; int c; int d; for(int i=1000; i<=9999; ++i) { a=i/1000; b=i%1000/100; c=i%100/10; d=i%10; int reverse=d*1000+c*100+b*10+a; if(i*9==reverse) { printf("%d\n",i); } } return 0; }