Tuesday, November 15, 2016

Codeforces Round #379 (Div. 2) 734 A - Anton and Danik





#include<bits/stdc++.h>
using namespace std;
int main()
{
    string s;
    int n,a_s=0,d_s=0;
    char ch;
    cin >> n;
    while(n--){
        cin >> ch;
        if(ch  ==  'A') a_s++;
        else d_s++;
    }
    if(a_s < d_s)
        cout << "Danik\n";
    else if(a_s > d_s)
        cout << "Anton\n";
    else
        cout << "Friendship\n";
    return 0;
}

No comments: