Advertisement
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(a<d) cout<< "DANIK" <<endl;
- else cout<<"Friendship" <<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement