提交时间:2024-07-26 17:26:01
运行 ID: 285866
#include <bits/stdc++.h> using namespace std; int main() { int g, s, b, q, c = 0; for (int i = 1000; i <= 9999; i++) { q = i / 1000; b = i / 100 % 10; s = i / 10 % 10; g = i % 10; if (q == g && b == s) { cout << i << " "; c++; if (c == 11) { cout << endl; c = 0; } } } return 0; }