This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define endl '\n'
#define int long long
using namespace std;
signed main() {
ios::sync_with_stdio(false);
cin.tie(0); cout.tie(0);
int S, E = 0;
cin >> S >> E;
for (int i = S; i <= E; i++){
string cur = to_string(i);
cur.begin();
string reversed = cur;
reverse(reversed.begin(), reversed.end());
if (reversed == cur){
cout << "Palindrome!" << endl;
}
else{
cout << i << endl;
}
}
}
# | 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... |