Advertisement
Sakil_Naeem

khela hobe

Sep 17th, 2019
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.49 KB | None | 0 0
  1. #include<iostream>
  2. #include<cstdio>
  3. //#include<string.h>
  4. using namespace std;
  5. int main()
  6. {
  7.     int n,a=0,d=0,i;
  8.     char s[100000];
  9.     cin>>n;
  10.      cin>>s;
  11.  
  12.     for(i=0;i<n;i++)
  13.  
  14.     {
  15.  
  16.         if(s[i]=='D')
  17.         {
  18.            d++;
  19.         }
  20.         else
  21.         {
  22.            a++;
  23.         }
  24.     }
  25.     if(a>d)
  26.     {
  27.         cout<<"Anton"<<endl;
  28.     }
  29.     else if(a<d)
  30.     {
  31.         cout<<"Danik"<<endl;
  32.     }
  33.     else
  34.         cout<<"Friendshif"<<endl;
  35.     return 0;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement