Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- { int n,a=0,d=0;
- string st ;
- cin>>n >> st;
- for(int i=0;i<st.length();i++)
- {
- if (st[i]=='A')
- {
- a++ ;
- }
- else { d++;
- }
- }
- if(a>d) cout<< "Anton"<< endl;
- else if(d>a) cout<< "Danik" << endl;
- else cout<< "Friendship"<< endl;
- return 0;
- }
Add Comment
Please, Sign In to add comment