Advertisement
leminhkt

noname27

Mar 17th, 2020
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.20 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int n, inp, res;
  4. map<int, int> m;
  5. int main(){
  6.     cin>>n;
  7.     while(n--){
  8.         cin>>inp;
  9.         while(inp){
  10.             if(m[res]<++m[inp%10]) res=inp%10;
  11.             inp/=10;
  12.         }
  13.     }
  14.     cout<<res;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement