Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<iomanip>
- #include<cmath>
- // #include <algorithm>
- using namespace std;
- void Ahmed_Negm(){
- #ifndef ONLINE_JUDGE
- freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
- #endif
- }
- int main()
- {Ahmed_Negm();
- long long n, rev;
- cin>>n;
- for(rev = 0; n > 0; n/10){
- rev = (rev*10) + (n%10);
- }
- if(rev == n){
- cout<<rev<<"\nYES";
- }else{
- cout<<rev<<"\nNO";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement