Advertisement
rengetsu

Codeforces_734A

Aug 9th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. //Codeforces Round 734A
  2. #include <iostream>
  3. using namespace std;
  4. int main()
  5. {
  6.     int n, arez=0, drez=0;
  7.     char nn[100001];
  8.     cin >> n;
  9.     for(int i=0;i<n;i++)
  10.     {
  11.         cin >> nn[i];
  12.         if(nn[i]=='A'){arez++;}
  13.         else{drez++;}
  14.     }
  15.     if(arez>drez){cout<<"Anton";}
  16.     else if(drez>arez){cout<<"Danik";}
  17.     else if(drez==arez){cout<<"Friendship";}
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement