Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n,mx=0,c=0,ok=0,o=0,x;
- cin>>n;
- while (n!=0){
- x=n;
- o=0;
- while (n){
- o=o*10+(n%10);
- n/=10;
- }
- if (x==o){
- ok=1;
- if (x>mx){
- mx=x;
- c=0;
- }
- }
- if (mx==x)
- c++;
- cin>>n;
- }
- if (ok==0)
- cout<<"NU EXISTA";
- else
- cout<<mx<<" "<<c;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement