| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 108812 | 冯俊淞 | 哪几扇门是打开的 | C++ | Wrong Answer | 1 MS | 268 KB | 288 | 2025-01-22 13:47:33 |
#include<iostream> using namespace std; int a1, s1, s2, d; int main() { cin >> s2; for (int i = 1; i <= s2; i++) { d = 0; s1 = i; while (s1) { a1 = s1 % 10; s1 /= 10; d = d * 10 + a1; } if (d == i) { cout << d << endl; } } return 0; }
------Input------
0
------Answer-----
1 4 9 16 25 36 49 64 81 100
------Your output-----