题解 | #BC97 回文对称数#
回文对称数
https://www.nowcoder.com/practice/5b143af8328f4e42adf5e10397ae44ef
#include <stdio.h> int main() { int n, a, b; scanf("%d", &n); for (int i = 1; i <= n; i++) { b = 0; a = i; while (a) { b = (a%10) + b*10; a = a/10; } if (b == i) printf("%d\n", b); } return 0; }