Advertisement
Istanvir389

Find The Winner

Jul 25th, 2017
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. int n,a=0,d=0;
  6. string st;
  7. cin>> n >> st;
  8. for(int i=0;i<st.length();i++)
  9. {
  10. if(st[i]=='A')
  11. {a++; }
  12. else
  13. {
  14.  
  15. d++; }
  16. }
  17.  
  18. if(a>d) cout<< "ANTON" <<endl;
  19. else if(a<d) cout<< "DANIK" <<endl;
  20. else cout<<"Friendship" <<endl;
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement