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>
using namespace std;
#define int long long
const int mod = 1e9+7;
#define deb(x) cout<<#x<<": "<<x<<endl
int iceil(int a, int b) {
return (a + b - 1) / b;
}
int check_pailindrome(int x){
string s=to_string(x);
string check="";
for(int i=s.size()-1;i>=0;i--) check.push_back(s[i]);
return(check==s);
}
signed main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.precision(20);
#ifdef strawberryshaker2005
freopen("input.txt", "r", stdin);
#endif
int s,e;
cin>>s>>e;
for(int i=s;i<=e;i++){
if(check_pailindrome(i)) cout<<"Palindrome!\n";
else cout<<i<<endl;
}
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... |