#include <bits/stdc++.h>
#define pb push_back
#define ll long long int
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
using namespace std;
int main() {
ll s, e; cin >> s >> e;
for (ll i = s; i <= e; i++) {
vector<ll> a; ll n = i;
while (n > 0) {
a.pb(n%10); n /= 10;
}
bool ok = 1;
for (int j = 0; j < a.size()/2; j++) {
if (a[j] != a[a.size()-j-1]) ok = 0;
}
if (ok) cout << "Palindrome!";
else cout << i; cout << "\n";
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |