Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int n, inp, res;
- map<int, int> m;
- int main(){
- cin>>n;
- while(n--){
- cin>>inp;
- while(inp){
- if(m[res]<++m[inp%10]) res=inp%10;
- inp/=10;
- }
- }
- cout<<res;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement