Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Rahul255 authored Nov 15, 2018
1 parent c183146 commit 6e30644
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions 734A.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#include <iostream>
#include <string>
using namespace std;

int main()
{
string s;
int n,i,a=0,b=0;
cin>>n;
for(i=0;i<n;i++)
{
cin>>s;
if(s[i]=='D')
{
b++;
}
else if(s[i]=='A')
{
a++;
}
}
if(a<b)
{
cout<<"Danik"<<endl;
}
else if(a>b)
{
cout<<"Anton"<<endl;
}
else
{
cout<<"Friendship"<<endl;
}
return 0;
}

0 comments on commit 6e30644

Please sign in to comment.