Initial commit

This commit is contained in:
xixu-me committed 2024-03-17 22:30:49 +08:00
commit bdf71aef37
120 files changed
+8284

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
#include <bits/stdc++.h>
using namespace std;
int loop(int x) {
int y = x;
int digit = 0;
int z = 0;
int ret = 0;
while (x > 0) {
digit = x % 10;
z = z * 10 + digit;
x /= 10;
}
if (y == z) {
ret = 1;
}
return ret;
}
int main(void) {
int a, b;
scanf("%d %d", &a, &b);
for (int i = a; i <= b; i++) {
if (loop(i) && i % 2 == 0) {
printf("%d\n", i);
}
}
return 0;
}