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