Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
86176 | 李泽宜 | 输出回文数 | C++ | Accepted | 30 MS | 272 KB | 307 | 2024-07-23 15:04:45 |
#include <iostream> using namespace std; int main() { int n, temp = 0, num = 0, mxx = 0; cin >> n; for (int i = 1; i <= n; i++) { mxx = i; num = 0; while (mxx) { temp = mxx % 10; mxx = mxx / 10; num = num * 10 + temp; } if (i == num) { cout << i << endl; } } }