denis_andrei10

nrminimcucifredinmijlocegale

Oct 29th, 2019
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1. #include<iostream>
  2. #include<climits>
  3. using namespace std;
  4. int main()
  5. {
  6.     int n, i, x, minim=INT_MAX;
  7.     cin>>n;
  8.     for(i=1; i<=n; i++)
  9.     {
  10.         cin>>x;
  11.         if(x/100%10==x/10%10 && x<minim )
  12.         {
  13.             minim=x;
  14.         }
  15.     }
  16.     cout<<minim;
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment